View Full Version : navigations with divs

04-17-2009, 01:24 PM

I have created nav bar using css and i want to show Home etc when i move the cursor over the button. I would usually use an ALT tag but where would i put this if the image is dynamically loaded using the CSS?

<a href="index.html"><div class="nav1"></div></a>

css code
background-image: url(home.png);
background-repeat: no-repeat;
float: right;
height: 50px;
width: 50px;
margin-top: 120px;
background-position: center center;

04-19-2009, 08:24 PM
The Alt attribute (it is not a tag) is used for alternative text when the image cannot be displayed. If you want a tooltip, use the title attribute, like this:
<a href="index.html" title="Home">

04-19-2009, 09:22 PM
DOH! not sure what i was thinking... sorry...