thanhtan Posted December 14, 2008 Share Posted December 14, 2008 Hi, I have a simple rollover navigation, which is as follows:: Code: <ul id="nav"> <li><a href="about.html" class="about"></a></li> <li><a href="guestpics.html" class="guestPics"></a></li> <li><a href="staff.html" class="staff"></a></li> <li><a href="webcams.html" class="webcams"></a></li> <li><a href="parties.html" class="parties"></a></li> <li><a href="contact.html" class="contact"></a></li> </ul> Here is the CSS for the about link:: Code: #nav a.about{ background-image:url(images/nav/about_off.gif); width:77px; height:18px; } #nav a.about:hover { background-image:url(images/nav/about_on.gif);} I don't see what I am doing wrong? Can someone help? thanks Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted December 14, 2008 Share Posted December 14, 2008 Welcome to the forums thantan A link would be nice but if you add the full url to the image it will probably work. >#nav a.about{ background-image:url(http://you-domain/images/nav/about_off.gif); width:77px; height: 18px;} #nav a.about:hover { background-image:url(http://you-domain/images/nav/about_on.gif);} Quote Link to comment Share on other sites More sharing options...
btrfld Posted December 14, 2008 Share Posted December 14, 2008 You might also need to specify the links as block >#nav a.about{ background-image:url(http://you-domain/images/nav/about_off.gif); width:77px; height: 18px; display:block;} #nav a.about:hover { background-image:url(http://you-domain/images/nav/about_on.gif);} Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted December 14, 2008 Share Posted December 14, 2008 Welcome to the forum, thanhtan. Quote Link to comment Share on other sites More sharing options...
carbonize Posted December 25, 2008 Share Posted December 25, 2008 Yes you don't really say what the problem is. One problem I have found with using CSS for image rollovers is that the browser seems to download the image each time and so you get an obvious delay unless you include the picture somewhere else on the page but say with dimensions of 1x1. Quote Link to comment Share on other sites More sharing options...
Suzanne Posted January 1, 2009 Share Posted January 1, 2009 thanhtan which browser are you using to view your site.. your code seems to be fine.. there is difference between browsers visibility. Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted January 1, 2009 Share Posted January 1, 2009 Welcome to the forum, Suzanne. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted January 1, 2009 Share Posted January 1, 2009 Welcome to the forums Suzanne Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.