开发者

Aligning icon in input field

开发者 https://www.devze.com 2023-03-09 03:38 出处:网络
I have a couple of issues. I have opted to use focus and blur for text values in input field over placeholder text as there is a issue in chrome with placeholder text being centered.

I have a couple of issues. I have opted to use focus and blur for text values in input field over placeholder text as there is a issue in chrome with placeholder text being centered.

I need to position the icon in the input field, center to the input field. And cross browser compliant.

I have tried everything to get the th开发者_运维问答ing centered. It's a sprite I made which works fine, that code is ok. Its the alignment vertically of the image that is the issue,

Could someone help please. The LINK to the fiddle is: http://jsfiddle.net/F2cdu/1/

All code is done, apart from the input field displaying the text on page load, but we can fix that. Everything else seems ok.


As I understood, you need to position .searchreset span above input? First, you need to wrap them with extra block (div) and make this div position:relative Then add position:absolute to your .searchreset and use top,left,right,bottom css properties to position .searchreset

0

精彩评论

暂无评论...
验证码 换一张
取 消