PayneLess_Designs

PayneLess Designs - Link - Background Image

Jun 8th, 2010
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.15 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html><head>
  3. <title>Link - Background Image</title>
  4. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  5. <meta name="generator" content="HAPedit 3.1">
  6. <style type="text/css">
  7. #header {
  8. width: 600px;
  9. height: 120px;
  10. margin: 0 auto;
  11. background:
  12. url(http://img186.imageshack.us/img186/4231/banpaynelessbyjonybdhl9.jpg) no-repeat center scroll;
  13. }
  14.  
  15. #header a {
  16. width: 600px;
  17. height: 120px;
  18. margin: 0 auto;
  19. background: url(http://img186.imageshack.us/img186/4231/banpaynelessbyjonybdhl9.jpg) no-repeat center scroll;
  20. display: block;
  21. text-decoration: none;
  22. }
  23.  
  24. #header a span {
  25. visibility: hidden;
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <p>As a last point, adding onfocus="this.blur()" into each link code will get rid of that annoying dotted line which appears when the link is clicked.</p>
  31. <div id="header"><a href="http://mysite.com"><span>MySite.com</span></a></div>
  32.  
  33. <p><a href="http://xavisys.com/css-trick-turning-a-background-image-into-a-clickable-link/" title="">CSS Trick: Turning a background image into a clickable link</a></p>
  34. </body></html>
Add Comment
Please, Sign In to add comment