I am trying to figure out how to place text on top of a link image. Instead of all kinds of explaining here is a link to some test code. http://dutchbarn.net/issue01.html I have found some other questions on this forum that are simular but none seem to fix my problem. The 1st, 3rd, and 4th buttons perform the way I want. The second is an example of my attempt to place a heading on top of the image of course the image does not respond to the hover condition as the heading text is covering it. I can use an individual image file for each button with the text already part of the image but search engines won't see the text and it won't be part of the "html5 outline". It also does not seem to be a clean way to write the page as more downloading is needed than seems necessary. On the last button I used the image as a background but you will notice it does not display right when hovered over. Any suggestions?
I have posted this question on a number of forums and aside from the useless reply above I have yet to receive a single reply! Does this question expose my stupidity or what? Am I missing something that is a no-brainer; surely others have had simular situations or not? Let me know at least if I missing the obvious! Thanx
An HTML image tag <img src="___">does not have a link
<a href="_____"> ___</a> attribute. So, if you want viewer to click image instead of text for link, you wrap the image tag inside the link anchor tag. Like so
<a href="_____"> <img src="______"> </a>
As far as text on top of an image is concerned, think you would be using Z-index. The element has to be "positioned" to apply a z-index.
It you have online link to your page, it might clarify things.
========
Sorry, missed your link above.
Last edited by auntnini; 11-27-2012 at 04:41 PM.
Reason: missed link above
Bookmarks