Advertisement
Guest User

Untitled

a guest
Sep 5th, 2011
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.55 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
  3.  
  4. <head>
  5.  
  6. <!-- Title -->
  7. <title>CSS Test</title>
  8.  
  9. <style type="text/css">
  10. a.shipping-info{border:1px solid #000;background:url('http://indiawebsearch.com/files/image/thumb_googlelogo.jpg') 0 -59px no-repeat; width: 111px;height:59px}
  11. a span {
  12.     display: block;
  13.     width: 0;
  14.     height: 0;
  15.     overflow: hidden;
  16. }
  17.  
  18. ul#mega {
  19.     float:left;
  20.     width: 100%;
  21.     list-style: none;
  22.     font-size: 1.1em;
  23. }
  24. ul#mega li {
  25.     float: left;
  26.     margin: 0; padding: 0;
  27.     position: relative;
  28.     z-index:1 /* oh my word!!!! */
  29. }
  30. ul#mega li a {
  31.     float: left;
  32.     line-height:1.6em
  33. }
  34. ul#mega li:hover a, ul#mega li a:hover { background-position: left bottom; }
  35. ul#mega li .sub {
  36.     position: absolute;
  37.     top: 58px; left: 0px;
  38.     float: left;
  39.     display: none;
  40. }
  41. ul#mega li .row {clear: both; float: left; width: 100%; margin-bottom: 10px;}
  42. ul#mega li .sub ul{
  43.     list-style: none;
  44.     margin: 0; padding: 0;
  45.     width: 150px;
  46.     float: left;
  47. }
  48. ul#mega .sub ul li {
  49.     width: 100%;
  50.     color: #fff;
  51. }
  52.  
  53. ul#mega li .sub {
  54.     position: absolute;
  55.     padding: 20px 20px 20px;
  56.     float: left;
  57.     width:440px!important;
  58.     display: none;
  59. }
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. /* ---------- Mega Drop Down --------- */
  69. #mega {
  70. list-style:none;
  71. }
  72. #mega li {
  73. float:left;
  74. position:relative;
  75. }
  76. #mega li:hover {
  77. border-bottom:0; /* border-bottom:0; and padding-bottom:1px; keeps <li> and <div> connected */
  78. padding:7px 0 1px 0;
  79. margin-top:-7px;
  80. z-index:1; /* shadow above adjacent li */
  81. }
  82. #mega a {
  83. color:#000;
  84. outline:0;
  85. text-decoration:none;
  86. display:block;
  87. line-height:2em;
  88. }
  89. /* ----------- Hide/Show Div ---------- */
  90. #mega div {
  91. position:absolute;
  92. left:-999em;
  93. margin-top:58px;
  94. margin-left:1px;
  95. width:350px;
  96. padding:0 10px 10px;
  97. border-top:0;
  98. font-weight:normal;
  99. text-align:left;
  100. background:#19bcef;
  101. }
  102. #mega li:hover div {
  103. left:-1px;top:auto;
  104. }
  105. #mega li.dif:hover div {
  106. left:-221px;
  107. }
  108. /* --------- Within Div Styles --------- */
  109. #mega div h2 {
  110. background:#999;
  111. font-size:1em;
  112. padding:0 10px;
  113. margin:10px 0 5px 0;
  114. clear:both;
  115. float:left;
  116. width:330px;
  117. position:relative; /* makes above drop shadow */
  118. }
  119. #mega div p {
  120. float:left;
  121. width:106px;
  122. padding-left:10px;
  123. position:relative; /* makes above drop shadow */
  124. }
  125. #mega div p a {
  126. text-decoration:underline;
  127. float:left;
  128. clear:left;
  129. width:100%; /* For IE6/7 */
  130. line-height:1.4;
  131. }
  132. #mega div a:hover, #mega div a:focus, #mega div a:active {
  133. text-decoration:none;
  134. }
  135.  
  136. #mega li a#ship {
  137.     width: 100px;
  138.     height: 59px;
  139.     position: relative;
  140. }
  141. #mega li a#ship span {
  142.     background: url('http://indiawebsearch.com/files/image/thumb_googlelogo.jpg') no-repeat;
  143.     position: absolute;
  144.     width: 100%;
  145.     height: 100%;
  146. }
  147. #mega li a#ship span:hover {
  148.     background: url('http://indiawebsearch.com/files/image/thumb_googlelogo.jpg') 0 -59px no-repeat;
  149.     position: absolute;
  150.     width: 100%;
  151.     height: 100%;
  152. }
  153.  
  154. </style>
  155.  
  156. </head>
  157.  
  158. <body id="home">
  159.  
  160. <div id="container">    
  161.  
  162.       <div id="top">&nbsp;</div>    
  163.  
  164.       <div id="middle">  
  165.      
  166.       <div id="nav">
  167.  
  168.         <ul id="mega">
  169.  
  170.           <li><a href="/shipping/" id="ship" class="shipping-info"><span></span>Home</a>
  171.           <b class="s4"></b>
  172.           <div> <b class="s1"></b><b class="s2"></b><b class="s3"></b><br /><br />
  173.             <p><a href="#">Test Link 1</a></p>
  174.           </div>
  175.  
  176.           </li>
  177.          
  178.         </ul>  
  179.  
  180.       </div>  
  181.  
  182.   </body>
  183.  
  184. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement