I have an image and a span inside a hyperlink that I need to appear on top of one another. Can anyone tell me why, when I use relative positioning on my span it causes the text to move to the correct spot but the line from the hyperlink stays at it's original position?
Here is the code in question...
-
<div class="menuBarStyle">
-
<a href="projects.aspx" onmouseover="buttonOver('projectButton', '../images /AlienDa3Over.gif')" onmouseout="buttonOver('projectButton', '../images/AlienDa3.gif')">
-
<img name="projectButton" src="http://bytes.com/submit/images/AlienDa3.gif" class="projectButtonStyle" alt="Projects" />
-
<span class="projectLabelStyle">Projects</span>
-
</a>
-
</div>
and these are the styles used...
- .menuBarStyle{
-
height:50px;
-
}
-
-
.projectButtonStyle{
-
position:absolute;
-
left:370px;
-
}
-
-
.projectLabelStyle
-
{
-
position:relative;
-
z-index:1;
-
left:380px;
-
top:5px;
-
color:#999999
-
}
annnd here's the page on my site...
My Site