PayneLess_Designs

PayneLess Designs - CSS Image Mouseover Link

Aug 12th, 2010
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.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>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  5. <title>CSS Image Mouseover Link</title>
  6. <link rel="stylesheet" type="text/css" href="css_page_designs.css">
  7. <meta name="description" content="">
  8. <meta name="keywords" content="">
  9. <meta name="author" content="">
  10. <meta name="generator" content="MSS Website Studio by van IJperen Software Inc. - http://www.marsansoft.nl">
  11. <style type="text/css">
  12. body {
  13. width: 800px;
  14. margin: 0 auto;
  15. font-size: 1em;
  16. }
  17.  
  18. pre { font-size: 0.75em; background: #000; color: #ff0; }
  19. </style>
  20.  
  21. <style type="text/css">
  22. * { margin: 0; padding: 0; border: 0; }
  23.  
  24. a { display: block; text-decoration: none; }
  25.  
  26. a:link.mousie {
  27. width: 455px;
  28. height: 132px;
  29. background: url(http://i34.tinypic.com/10ncapu.jpg) no-repeat center scroll;
  30. }
  31.  
  32. a:hover.mousie {
  33. background: url(http://i36.tinypic.com/fdttvp.jpg) no-repeat center scroll;
  34. }
  35.  
  36. div#link_container {
  37. width: 455px;
  38. margin: 5% auto;
  39. }
  40.  
  41. .mousie span {
  42. visibility: hidden;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. <div id="wrap"><!-- START WRAP --><div id="contents"><!-- START CONTENTS -->
  48.  
  49. <div id="link_container">
  50.  
  51. <a class="mousie" href="#URL_Path_Here" title="Mouseover Description"><span>Text Link Description hidden</span></a>
  52.  
  53. </div>
  54.  
  55. <h3>Basic Code Used:</h3>
  56.  
  57. <pre><code>
  58. &lt;head>
  59. &lt;style type="text/css">
  60. * { margin: 0; padding: 0; border: 0; }
  61.  
  62. a { display: block; text-decoration: none; }
  63.  
  64. a:link.mousie {
  65. width: 455px; /* Image Width */
  66. height: 132px; /* Image Height */
  67. background: url(mouse_off.jpg) no-repeat center scroll;
  68. }
  69.  
  70. a:hover.mousie {
  71. background: url(mouse_on.jpg) no-repeat center scroll;
  72. }
  73.  
  74. div#link_container {
  75. width: 455px; /* Image Width */
  76. margin: 5% auto;
  77. }
  78.  
  79. .mousie span {
  80. visibility: hidden;
  81. }
  82. &lt;/style>
  83. &lt;/head>
  84.  
  85. Between body tags:
  86.  
  87. &lt;div id="link_container">
  88.  
  89. &lt;a class="mousie" href="#URL_Path_Here" title="Mouseover Description"><span>Text Link Description hidden&lt;/span>&lt;/a>
  90.  
  91. &lt;/div>
  92. </code></pre>
  93.  
  94. </div><!-- END CONTENTS --></div><!-- END WRAP -->
  95. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment