Previous Message
Next Message

An explanation..

Sent by David Dorward on 2 March 2006 07:07


On 01/03/06, Michel Sabatino [EMAIL-REMOVED]> wrote:
> #content{
>     width:540px;
>     padding:20px;
> }
> html>body #content{width:500px;}

> Can somebody explain me briefly the last line : html>body #content
> Why declare the width in this declaration and not above?

Internet Explorer can't cope with child selectors, so the latter
declaration only gets seen by browsers which don't (incorrectly) put
the 40px of padding inside the width (which IE does in Quirks mode).

It isn't a recomended solution as IE7 will require a fair bit of
running around once we know which hacks to hide things from its parser
still work, and which bugs are still present. Conditional comments are
likely to be a better bet.

--
David Dorward <http://dorward.me.uk><http://blog.dorward.me.uk>
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: