View Full Version : IE6, having to create a class for default element styles

05-23-2008, 04:54 PM
Just a quick question:

I have the below style for my text inputs and IE6 ignores it...

input[type=text]{margin: 3px 0; padding: 1px; outline: 0;}

In order for IE6 to obey the above style, I have to create a separate class, and apply it to each text input. It's not a huge deal, just redundant.

input.text{margin: 3px 0; padding: 1px; outline: 0;}

Is this the only work-around in IE6 or am I missing something?


05-23-2008, 05:37 PM
The first one has never worked in IE6. Thats the only work-around or you could try using the IE7 script from Dean Edwards. The only downside of this is users with JS disabled don't get the benefits but users with js enabled the first code you posted would work as intended.