Forum Moderators: not2easy
[edited by: alt131 at 3:10 pm (utc) on Jul 23, 2011]
[edit reason] Thread [/edit]
ul {
margin:0;
padding:0;
}
#nav {
width:624px;
height:65px;
margin:0 auto;
padding:0;
line-height:35px;
}
#nav li {
float:left;
position:relative;
height:65px;
list-style-type:none;
}
#nav li a {
width:100%;
height:100%;
display:block;
color:transparent;
}
#nav li ul a {
height:65px;
text-decoration:none;
font:bold 0.9em/60px arial,helvetica,sans-serif;
color:#FFF;
}
#home, #locations, #maps, #advertise, #about, #contact {background: #000 url(menuSPRITE.jpg) no-repeat ;}
#home {width:102px; background-position: 0 -65px}
#home:hover {background-position:0 0}
#locations {width:104px; background-position:-102px -65px }
#locations:hover {background-position: -102px 0 }
#maps { width:105px; background-position:-206px -65px;}
#maps:hover { background-position:-206px 0;}
#advertise {width:105px;background-position:-311px -65px;}
#advertise:hover {background-position:-311px 0;}
#about {width:104px;background-position:-416px -65px }
#about:hover {background-position:-416px 0;}
#contact {width:102px;background-position:-520px -65px;}
#contact:hover {background-position:-520px 0;}
#locations ul, #advertise ul {
position: absolute;
left: 0;
top: 65px;
width:422px;
background-color: #000000;
line-height: 35px;
height:32px;
visibility:hidden;
}
#locations ul li, #advertise ul li {
float:left;
width:100px;
height:32px;
}
#locations ul li a, #advertise ul li a {
padding:7px 10px;
background:none;
color:#ffb100;
text-align:left;
border:1px solid #363836;
font-family:Arial;
font-weight:normal;
height:17px;
line-height:17px;
font-size:13px;
border-top:1px solid #363836;
}
#locations:hover ul, #advertise:hover ul {
visibility:visible;
}
#locations:hover ul li ul, #advertise:hover ul li ul {
visibility:hidden;
width:422px;
top:32px;
height:32px;
}
#advertise:hover ul li ul {
width:722px;
}
#locations ul li:hover ul, #advertise ul li:hover ul {
visibility:visible;
width:422px;
top:32px;
height:32px;
}
#advertise ul li:hover ul {
width:722px;
}
#nav li#locations li a:hover, #nav li#advertise li a:hover {
background:#151312;
color:#e4e4e4;
text-decoration:none;
}
[edited by: alt131 at 3:09 pm (utc) on Jul 23, 2011]
[edit reason] Thread Tidy - Examplifying [/edit]
ul {
margin:0;
padding:0;
}
#nav {
width:624px;
height:65px;
margin:0 auto;
}
#nav li {
float:left;
height:65px;
list-style-type:none;
}
#nav li a {
width:100%;
height:100%;
display:block;
/* hides text in winsafari - but note not valid in css2.1*/
color:transparent;
/* hides text in ie */
font-size:0;
text-decoration:none;
}
/* best practise to provide a background-color: */
#home, #locations, #maps, #advertise, #about, #contact {background: #000 url(menuSPRITE.jpg) no-repeat ;}
/* no change to any of the id'ed li widths and background-positions*/
#locations ul, #advertise ul {
/* use relative to save setting position on a parent element */
position: relative;
background-color: #000000;
width:201px;
visibility:hidden;
}
#locations ul li, #advertise ul li {
width:180px;
height:32px;
}
#locations ul li a, #advertise ul li a {
/* no change except: */
/*background:#000000; background is shorthand, use background-color instead*/
background-color:#000;
}
#locations:hover ul, #advertise:hover ul {
visibility:visible;
}
#locations ul li ul, #advertise ul li ul {
/* winSafari doesn't like margins */
left:200px;
top:-32px;
width:201px;
}
#locations:hover ul li ul, #advertise:hover ul li ul {
visibility:hidden;
}
#locations ul li:hover ul, #advertise ul li:hover ul {
visibility:visible;
}
#nav li#locations li a:hover, #nav li#advertise li a:hover {
background-color:#151312;
color:#e4e4e4;
}
[edited by: alt131 at 3:08 pm (utc) on Jul 23, 2011]
[edit reason] Thread Tidy - Examplifying [/edit]
[edited by: alt131 at 3:08 pm (utc) on Jul 23, 2011]
[edit reason] Thread Tidy - Examplifying [/edit]
[edited by: alt131 at 3:07 pm (utc) on Jul 23, 2011]
[edit reason] Thread Tidy - Examplifying [/edit]