I have created the navigation bar below, but the images does not display at all. In dreamweaver they do , but in Mozilla and IE8 not. Can someone please find the errors?
Many thanks!
CSS
[#leftnav a{
display:block;
height: 40px;
text-decoration:none;
}
#leftnav a#home{
background: transparent url(images/nav/home.gif) 0 0 no-repeat center left;
}
#leftnav a:hover#home{
background: transparent url(images/nav/home_h.gif) 0 0 no-repeat center left;
}
#leftnav a#faq{
background: transparent url(images/nav/faq.gif) 0 0 no-repeat center left;
}
#leftnav a:hover#faq{
background: transparent url(images/nav/faq_h.gif) 0 0 no-repeat center left;
}
#leftnav a#bio{
background: transparent url(images/nav/bio.gif) 0 0 no-repeat center left;
}
#leftnav a:hover#bio{
background: transparent url(images/nav/bio_h.gif) 0 0 no-repeat center left;
}
#leftnav a#dates{
background: transparent url(images/nav/dates.gif) 0 0 no-repeat center left;
}
#leftnav a:hover#dates{
background: transparent url(images/nav/dates_h.gif) 0 0 no-repeat center left;
}
#leftnav a#menu3{
background: transparent url(images/nav/menu3.gif) 0 0 no-repeat center left;
}
#leftnav a:hover#menu3{
background: transparent url(images/nav/menu3_h.gif) 0 0 no-repeat center left;
}]
HTML
[
]
Please post your HTML in the
Please post your HTML in the provided code tags.
And what are the "0 0" for is the background tag? Try removing those...
Hello nilssonmag , Yes, the 0
Hello nilssonmag ,
Yes, the 0 0 is not doing much for you. It's also coded wrong when styling the hover... should be more like this maybe -
#leftnav a#home{ background: transparent url(images/nav/home.gif) no-repeat center left; } #leftnav a#home:hover{ background: transparent url(images/nav/home_h.gif) no-repeat top left; } #leftnav a#home:visited{ background: transparent url(images/nav/home_h.gif) no-repeat bottom left; }
Without seeing your image I am only guessing at top/center/bottom.