An Even Better IE Button Width Fix

by @jehiah on 2006-05-12 12:07UTC
Filed under: All , HTML , CSS , IE

It’s a good thing there are people smarter than me out there. People like Jose Olarte , Martin and Peter who have cleaned up my original solution to long buttons in IE.

As it turns out, I missed that it was the lack of units which caused width:1 to fail.

Anyway, thanks to Jose and Peter: here is the updated fix. It removes the need for conditional comments for IE (which is nice because it makes it easier to integrate into your css file)

[css]
input.button {
    padding: 0 .25em;
    width: 0;
    overflow:visible;
}

input.button[class] { /*ie ignores [class]*/
    width: auto;
}
[/css]
Subscribe via RSS ı Email
© 2022 - Jehiah Czebotar