Overwrite in-line styles…I know, its crazy!
So, I have had no idea why the hell I would want to do this, but I thought I would throw this little CSS nugget out there for you. You can actually overwrite in-line styles…look at this:
Here is the html:
div id=”test” style=”background: red;” (carrot thingys <> are taken off so it doesn’t actually style this paragraph)
Here is the CSS to overwrite that:
div[id="test"] { background: yellow !important;}
This works in FF 2 and IE7, so I will assume that it works in all current browsers also (FF 3.5, IE8, Safari 4x, Chrome). It does NOT however work in IE6. I can’t wait till that damn browser goes away. Have I said that before? If not, times it by 10.





