/*
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
tags in the menu including the first level */
.menulist {
margin: 0;
padding: 0;
list-style: non e;
font-family: trebuchet ms, tahoma, arial, helvetica, serif;
letter-spacing:2px;
font-size: 16px;
}
/* Submenus ( tags) are hidden and absolutely positioned downwards from their parent */
.menulist ul {
display: none;
position: absolute;
margin: 0;
padding: 0;
list-style: none;
font-family: trebuchet ms, tahoma, arial, helvetica, serif;
top: 0; margin-top: 34px; /* I'm using ems and px to allow people to zoom their font */
left: 0px;
width: 250px;
background: #CC0000;
color: #FFFFFF;
}
/* Second and third etc. level submenus - position across from parent instead */
.menulist ul ul {
top: -1px; margin-top: 5;
left: 148px;
background: #CC0000;
color: #FFFFFF;
}
/*
All menu items (- tags). 'float: left' lines them up horizontally, and they are
positioned relatively to correctly offset submenus. Also, they have overlapping borders.
*/
.menulist li {
float: left;
display: block;
position: relative;
padding: 0px;
padding-top: 0px;
padding-top: 0px;
border-top: 0px solid #FFFFFF;
border-bottom: 0px solid #eee;
border-left: 0px solid #CCCCCC;
border-right: 1px solid #CCCCCC;
margin-right: 0px;
height:33px;
line-height:33px;
}
/* Items in submenus - override float/border/margin from above, restoring default vertical style */
.menulist ul li {
float: none;
margin: 0;
box-shadow: 5px 5px 5px #333333;
background: #CC0000;
color: #FFFFFF;
border: 0px;
padding: 0px;
border-bottom: 1px solid #FFFFFF;
}
.menulist ul>li:last-child {
border-bottom: 0px;
margin-bottom: 0px; /* Mozilla fix */
}
/* Links inside the menu */
.menulist a {
display: block;
padding: 0px;
padding-left: 0px;
padding-top:0px;
background: #E7E7E7;
color: #666666;
text-decoration: none;
border: 0px solid #FFFFFF;
margin: 0;
padding: 0;
text-align:center;
background-image: url(../mod_media_db/pic_part.php?sid=tms11a0g0af9751dcaa52299904a5fd46e8531902&object_id=600fdfa6b1ef5439846fe88215447c08.1280.1300.285.161.16.34);
text-decoration:none;
}
.menulist a:hover, {
display: block;
padding: 0px;
padding-left: 0px;
padding-top:0px;
background: #E7E7E7;
color: #000000;
text-decoration: none;
border: 0px solid #FFFFFF;
margin: 0;
padding: 0;
background-image: url(../mod_media_db/pic_part.php?sid=tms11a0g0af9751dcaa52299904a5fd46e8531902&object_id=600fdfa6b1ef5439846fe88215447c08.1280.1300.285.161.16.34);
text-decoration:none;
}
.menulist ul li a, .menulist ul li a:visited {
display: block;
padding: 0px;
background: #CC0000;
color: #FFFFFF;
text-decoration: none;
text-align:left;
background-image:none;
text-decoration:none;
}
.menulist ul li a:hover, .menulist a.highlighted:hover, .menulist a:focus {
background: #CC0000;
color: #eeeeee;
background-image: url(../mod_media_db/pic_part.php?sid=tms11a0g0af9751dcaa52299904a5fd46e8531902&object_id=600fdfa6b1ef5439846fe88215447c08.1280.1300.780.497.1.34);
text-decoration:none;
}
/* Lit items: 'hover' is mouseover, 'highlighted' are parent items to visible menus */
.menulist a:hover, .menulist a.highlighted:hover, .menulist a:focus {
background: #CECECE;
color: #000000;
text-decoration:none;
background-image: url(../mod_media_db/pic_part.php?sid=tms11a0g0af9751dcaa52299904a5fd46e8531902&object_id=600fdfa6b1ef5439846fe88215447c08.1280.1300.427.161.5.34);
}
.menulist a.highlighted {
background: #CECECE;
color: #000000;
text-decoration:none;
background-image: url(../mod_media_db/pic_part.php?sid=tms11a0g0af9751dcaa52299904a5fd46e8531902&object_id=600fdfa6b1ef5439846fe88215447c08.1280.1300.427.161.5.34);
}
/*
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:
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. */
.menulist a .subind {
display: none;
background: #69AF32;
color: #FFFFFF;
text-decoration:none;
}
.menulist ul a .subind {
display: block;
float: right;
background: #69AF32;
color: #FFFFFF;
text-decoration:none;
}
/* 'Escaped Comment' hack for horizontal menubar width in IE5/Mac */
.menulist a {
float: left;
text-decoration:none;
}
.menulist ul a {
float: none;
text-decoration:none;
}
/* \*/
.menulist a {
float: none;
}
/* */
/*
HACKS: IE/Win:
A small height on
- and 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 .menulist ul li {
float: left;
width: 100%;
}
* html .menulist ul li {
float: left;
height: 1%;
}
* html .menulist ul a {
height: 1%;
text-decoration:none;
}
/* End Hacks */