• Answers
  • Web
Answer 3 out of 3
 
16 helpful answers
A:

Create two CSS style rules: one with a background image for the anchor link in its normal state, and one with an image for the link's hover state:

<style type="text/css">
#mylink { background-image: url(normal.png); }
#mylink:hover { background-image: url(hover.png); }
</style>

<a id="mylink" href="http://example.com">This is a link with a background image</a>

 

The styling could also be in an external css stylesheet. Obviously, change 'mylink', 'normal.png' and 'hover.png' to whatever you've got.

You may want to read this reference of the CSS background property.

Posted 3 years ago
Premasagar was invited by Yedda to answer this question.

Helpful?(2)
Rated as Best Answer
 
Comment About This Answer (or add your own answer)

Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
  • Answers
  • Web
Copyright © 2006-2009, Yedda Inc. and respective copyright owners