Posted By

michellebracken on 08/18/11


Versions (?)

Wrap Links Around a Background Image

 / Published in: CSS

Again since a background image doesn’t create a new CSS box you can’t directly wrap a link around it. You can either wrap the link around the containing element or wrap the link around all the content inside the containing element.

Either will essentially let someone click your background image as though it were a link.

  1. 1 </pre>
  2. 2 <div id="bkgd-image">your content here</div>
  3. 3 <pre></pre>
  4. 4 <div><a>
  5. 5
  6. 6 your content here
  7. 7
  8. 8 </a></div>
  9. 9 <pre>

Report this snippet  

You need to login to post a comment.