Clickable Header.Image instead of H1>a


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. HTML:
  2.  
  3. <h1 id="header">
  4. <a href ="#">header-title</a>
  5. </h1>
  6.  
  7. CSS:
  8.  
  9. #header a {
  10. background: url("xyz.gif") no-repeat scroll 0 0 transparent;
  11. text-indent: -9999px; /* move link far away so it appears "invisible" to users but still readable to robots */
  12. float: left; /* only if needed */
  13. display: block /* change inline element to block element */
  14. height: 10px; /* apply size to block element */
  15. width: 10px;
  16. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.