View Full Version : Menu Bars & CSS

08-15-2005, 07:29 AM

I'm building a vertical menu in CSS. All the links are in an unordered list. The top slice of the menu bar directly above the links is an image.

Should I:

A) Set it up so the first <li> of the unordered list contains the img?


B) Place a div directly above the unordered list with the img in it?

What'd you do??

08-15-2005, 11:51 AM
Um, I'd probably put the menu in a div, set the background image of the div to the one you want, and add a top margin to the menu to bring the menu items below it.


<div id="menudiv">
<ul class="menulist">
<li>First Item</li>
<li>Second Item</li>
<li>Third Item</li>

#menudiv { background: url(image.jpg) top center no-repeat; }
ul.menulist { margin-top: 30px; }