|
Posted by Benjamin Niemann on 10/23/05 17:45
windandwaves wrote:
> Toby Inkster wrote:
>> windandwaves wrote:
>>
>>> Someone taught me that using the following is like an IE hack:
>>> div#mydiv {padding: 10px; * padding: 12px;}
>>
>> I've never seen this, and don't know whether it works, but it's
>> invalid. Better to do something like:
>>
>> DIV#mydiv
>> { padding: 10px; }
>> HTML>BODY DIV#mydiv
>> { padding: 12px; }
>>
>> which works and is valid.
>
> It works fine. Your example I think works the other way. It works in all
> browsers but IE
The problem with your 'hack' is that there is not well-defined, correct way
to parse it - because it is invalid. Which browser parses it this or that
way is even more random then with the valid hacks.
And with the upcoming IE7, which will fix most parser bugs, but not all CSS
bugs, such hacks are not a good idea anymore. Seems like conditional
comments are the least evil way to do thing like this...
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
[Back to original message]
|