PDA

View Full Version : navigations with divs


cocoonfx
04-17-2009, 01:24 PM
Hello


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
}nav1
background-image: url(home.png);
background-repeat: no-repeat;
float: right;
height: 50px;
width: 50px;
margin-top: 120px;
background-position: center center;
}

domedia
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">

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