I have HTML which looks something like this:
<nav class="subnav">
<ul>
<li><a href="">Level 1</a></li>
<li><a href="">Level 1</a></li>
<li>
<a href="">Level 1</a>
<ul>
<li>
<a href="">Level 2</a>
<ul>
<li><a href="">Level 3</a></li>
<li><a href="">Level 3</a></li>
<li><a href="">Level 3</a></li>
</ul>
</li>
<li><a href="">Level 2</a></li>
<li><a href="">Level 2</a></li>
</ul>
</li>
<li><a href="">Level 1</a></li>
<li><a href="">Level 1</a></li>
</ul>
</nav>
I'm basically looking for a simple way to style it in CSS3 so that each sub-level shown as a separate column to the right (instead of being inserted and indented); something like this:
Level 1 | Level2 > Level3
Level 1 | Level2 | Level3
Level 1 > Level2 | Level3
Level 1 | |
Level 1 | |
Ideally, those columns should also have the following properties:
- flexible width, so other content can be next to this; it should be aligned/floated left
- any level of nesting, and any number of entries in each level
- a common wrapper which expands with new levels an can be styled separately
- each column should take 100% of the wrapper's height
Am I asking for too much? :-)
<nav>in this case) dynamic. I'll modify the question accordingly.