Forum Moderators: not2easy
I would like to present the navigation as several adjacent columns with 3 or 4 items each. Ideally, this should be do-able without having to resort to several css lists in a table. The code should be one set of nested lists like this:
<ul id="navlist">
<li>Music Videos</li>
<ul id="subnavlist">
<li><a href="#">Hip Hop / Rap</a></li>
<li>R&B / Soul</li>
<li>Pop / Dance</li>
<li>Electronic</li>
<li>Rock / Metal</li>
</ul>
<li>Movies</li>
<ul id="subnavlist">
<li>New this Week</li>
<li>Trailers / Reviews</li>
<li>Reel Deal TV</li>
</ul>
</ul>
I need advice on what css to use to display the main categories inline/adjacent, and display the subnav list items on separate lines within each category block.
Any help would be appreciated!
Thanks
Ben Davis
[edited by: Brett_Tabke at 10:07 pm (utc) on Mar. 27, 2004]
<dl>
<dt>Music Videos</dt>
<dd>Hip Hop / Rap</dd>
<dd>R&B / Soul</dd>
<dd>Pop / Dance</dd>
<dd>Electronic</dd>
</dl>
HTML:
<div id="navlist">
<dl>
<dt>Music Videos</dt>
<dd><a href="#">Hip Hop / Rap</a></dd>
<dd>R&B / Soul</dd>
<dd>Pop / Dance</dd>
<dd>Electronic</dd>
<dd>Rock / Metal</dd>
</dl>
<dl>
<dt>Movies</dt>
<dd>New this Week</dd>
<dd>Trailers / Reviews</dd>
<dd>Reel Deal TV</dd>
</dl>
</div> CSS:
dl
{
border: 1px solid #000;
padding: 10px;
float: left;
margin-right: 1em;
}dt { font-weight: bold; }
dd
{
margin: 0;
padding: 0;
}
Note: I haven't tested this.