/* Here's a demo stylesheet used to format a menu and its content. Feel free to alter the menu layout however you want! All you have to do is ensure the script has the correct CSS property name (like 'visibility' or 'display') that changes to show/hide menus. If you want to extend this layout, one good resource for UL/LI formatting is: http://www.alistapart.com/articles/taminglists/ Alternatively, you can use any other CSS dropdown layout instead. More here: http://www.alvit.de/css-showcase/ Consult your favourite CSS reference for customising fonts/borders/etc. Otherwise, you can just change the #RGB border/background colours where suitable to customise for your site -- easy :). */ /* HORIZONTAL FREESTYLE MENU LAYOUT */ /* All <ul> tags in the menu including the first level */ #dept-tabs ul ul { margin: 0; padding: 0; list-style: none; } /* Submenus (<ul> tags) are hidden and absolutely positioned downwards from their parent */ #dept-tabs ul ul { display: none; position: absolute; left: -1px; top: 24px; width: 170px; border: solid 1px #037abe; } /* Second and third etc. level submenus - position across from parent instead */ .menulist ul ul { top: -1px; margin-top: 0; left: 148px; } /* All menu items (<li> tags). 'float: left' lines them up horizontally, and they are positioned relatively to correctly offset submenus. Also, they have overlapping borders. */ #dept-tabs ul li { float: left; display: block; position: relative; background: #fff; margin-right: -1px; } /* Items in submenus - override float/border/margin from above, restoring default vertical style */ #dept-tabs ul ul li { float: none; margin: 0; } #dept-tabs ul ul>li:last-child { margin-bottom: 1px; /* Mozilla fix */ } /* Links inside the menu */ #dept-tabs ul li ul a { display: block; padding: 3px; color: #666; text-decoration: none; } /* Lit  items: 'hover' is mouseover, 'highlighted' are parent items to visible menus */ #dept-tabs ul li ul a:hover, #dept-tabs ul li ul a.highlighted:hover, #dept-tabs ul li ul a:focus { color: #fff; background-color: #037abe; } #dept-tabs ul li ul a.highlighted { color: #fff; background-color: #037abe; } /* If you want per-item background images in your menu items, here's how to do it. 1) Assign a unique ID tag to each link in your menu, like so: <a id="xyz" href="#"> 2) Copy and paste these next lines for each link you want to have an image: .menulist a#xyz { background-image: url(out.gif); } .menulist a#xyz:hover, .menulist a.highlighted#xyz, .menulist a:focus { background-image: url(over.gif); } */ /* Only style submenu indicators within submenus. */ #dept-tabs ul a .subind { display: none; } #dept-tabs ul ul a .subind { display: block; float: right; } /* 'Escaped Comment' hack for horizontal menubar width in IE5/Mac */ #dept-tabs ul li ul a { float: left; } #dept-tabs ul ul li ul a { float: none; } /* \*/ #dept-tabs ul li ul a { float: none; } /* */ /* HACKS: IE/Win: A small height on <li> and <a> tags and floating prevents gaps in menu. * html affects <=IE6 and *:first-child+html affects IE7. You may want to move these to browser-specific style sheets. */ *:first-child+html #dept-tabs ul ul li { float: left; width: 100%; } * html #dept-tabs ul ul li { float: left; height: 1%; } * html #dept-tabs ul ul a { height: 1%; } /* End Hacks */