[thelist] [CSS] Specificity Issues

Dru and Cindy Sellers dru at zetachi.org
Mon Oct 21 17:46:01 CDT 2002


First let me say thanks to both the readers of this post and the people who
keep it going.

I have a css selector question for those in the know. First, is there any
difference between " div.body div {} " and " div.body > div {} "? Second, I
have a simple page

======

<html>
  <head>
    <style>
	div {margin-left: 20px; border-left: 1px solid #000;}
	div  div {margin-left: 20px; border-left: 1px solid #000;}
    </style>
  </head>
  <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?

dRu
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/02




More information about the thelist mailing list