If you're marking up stuff as a tree, the markup should probably look like a tree:<br><section id="tree">First group<br><div>Second Group<br><div>Third Group</div><br></div><br></section>
<br><br>if what you want it a tree, that structure is better, so the CSS would simply say:<br>#tree, #tree div { margin-left: 5em; }<br><br>If you want to style each level differently, that's still easy to do without making up class names:
<br>#tree { background: blue; }<br>#tree > div { background: green; }<br>#tree > div > div { background: yellow; }<br><br>Child selectors are not supported by IE6, but I believe they are by IE7 and every other browser.
<br>