sfraise Posted November 9, 2010 Share Posted November 9, 2010 I have 4 images that all link to another page in a floating div on the front page of www.erecoverydev.com. For some reason when I float the div the linkable area on the image doesn't line up with the image like the link isn't floating with the image. Here is the css I'm using to float it: .nametags { position:relative; float:right; margin-right:75px; margin-top:-175px; } And here is how the html looks: <a title="Myself" href="/index.php?option=com_content&view=article&id=48:myself&catid=14&Itemid=148"><img alt="Get help for myself" src="/images/Myself.png" /></a> It doesn't make sense to me why an image wrapped in an a tag wouldn't have the linkable area line up with the actual image, I mean the image is WRAPPED in the link so I don't understand it at all. Looking at the page source it looks normal as well so I'm totally at a loss here. Quote Link to comment https://forums.phpfreaks.com/topic/218210-linked-images-in-floating-div-dont-line-up-with-link-area/ Share on other sites More sharing options...
sfraise Posted November 9, 2010 Author Share Posted November 9, 2010 Never mind, I figured it out. Turns out to be a z-index thing, I didn't even think about it since the image was visible so thought it had to be something with the float. Anyway, just set the z-index and all is fine. Quote Link to comment https://forums.phpfreaks.com/topic/218210-linked-images-in-floating-div-dont-line-up-with-link-area/#findComment-1132290 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.