Tuesday, November 17, 2009

Input type Button width problems in IE

Input type button create extra space in both sides in ie. We have some solution for for resolving this issue in ie .Its worked for me in all browsers.
This problem occur when we try to cutomize the input button using our own images.

Here you go

Use the "overflow:visible" property in css class file to overcome the problem in ie. Here is the below example what i am trying to say.

Sample CSS Class :

.button{
border: 0px
padding:0 .25em;
overflow:visible; /*This is the solution for control the input type button width in ie*/
_width:0; /*This prefix "_" will work on for IE*/
}

HTML :
Here is the button looks in ie :


Here is the updated image below after applying the css class :


Hope my tip will work for you, otherwise mail me your any kind of css problem i can find solution for you.

Thanks
Satish Veera

1 comment:

Anonymous said...

thanks for the post