This snippit of HTML and CSS will let you use a background image in CSS and use it as a hyperlink in HTML. Here’s the code.

HTML Code:

<a id="test" href="http://yourlink.com">This will get moved off screen</a>

CSS:

a#test{
display:block;
width:100px;
height: 50px;
background: url(images/yourimage.jpg) no-repeat;
text-indent: -9999px;
}

Many thanks to R1gM for this.

0 comments

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>