Hello
I have a structure of nested elements somehow like:
<article>
<div>
<section>
<table>
...
</table>
</section>
<section>
<p>This second section is not always present!!</p>
</section>
</div>
</article>
<nav>
<div>
<ul id="navi1">
...
</ul>
...
</div>
</nav>
And the CSS:
table {
border-top: 3px dotted green;
border-bottom: 3px dotted green;
}
#navi1 {
border-top:3px dotted green;
}
Now, I would like to remove the border on #navi1, when there is no
content between the table and #navi1. The following do not work:
table + #navi1 {
border-top:none;
}
article div section table + nav div #navi1 {
border-top:none;
}
Is there a possibility to select "adjacent" elements, if they are nested
separately? (I know about applying classes and such, but I'd like a
solution where I don't need to know at coding time whether there is
content after the table or not.)
Thanks for a hint!
Markus
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/