[thelist] [CSS] Specificity Issues

sasha spam at bittersweet2.com
Tue Oct 22 10:14:01 CDT 2002


10/21/2002 7:35:50 PM, Scott Schrantz <scotts at rci-nv.com>
wrote:

>> -----Original Message-----
>> From: Dru and Cindy Sellers [mailto:dru at zetachi.org]
>>
>> <html>
>>   <body>
>> 	<div>111
>>           <div>222
>>             <div>333</div>
>>           </div>
>>         </div>
>>   </body>
>> </html>
>>
>> How can I spwcify only one child level deep with css? I
want
>> both the "111" and the "222" to have a margin and the
"333"
>> to not have a margin. Any ideas?
>
>1. body div{} would affect all three of them
>2. body>div{} would affect 111
>3. body>div>div{} would affect 222
>4. body>div>div>div{} would affect 333
>
>Only #1 works in IE. Underline that, put it in bold, and
staple it to your
>forehead. IE doesn't understand the child selector (>),
making it almost
>useless for practical use. Actually, its greatest use
currently is as a hack
>to hide styles from IE.
>
>--
>Scott Schrantz
>work: www.rci-nv.com
>play: www.computer-vet.com
>--

Well, someone better tell my IE 5.0 that it isn't supposed to
understand child selectors.  I seem to have no problems using
a>img {}.

sasha






More information about the thelist mailing list