xhtml - CSS text replace with image, need hyperlink -


I use my & lt; I am using the text-indent technology to replace h1 / & gt; Tag with the image of my website:

  & lt; H1 title = "homepage" & gt; My logo & lt; / H1>  

CSS:

  #header h1 {float: left; Background: Transparent url ('../ images / logo.png'); Width: 214px; Height: 64px; Text indent: -9999 pixels; }  

The only problem is that I still want to do a new image work as a hyperlink. I tried to do this:

  & lt; H1 headline = "homepage" & gt; & Lt; A href = "#" & gt; My logo & lt; / A & gt; & Lt; / H1>  

But since this is being indented, there is also a link. I wanted to know how anyone has to do this and still have any suggestions on valid XHTML.

Edit I want to do it in a way that is accessible to users from the screen reader, which I have read, from display: any Some readers will not work with

homepage

Then I do this CSS, this ">

  # header H1A {display: block; padding: 22px 060; Background image: URL (../images / sidebar / heading page); Background repeat: no duplication; height: 0px! Important; height / ** /: 22px;}  

The only thing you need to edit is that it is height , and padding-top . In this example it will be 22px It should be equal to your image-height.


Comments