473,698 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hover layout

8 New Member
Hi I saw this layout and wanted to try some thing similar, but I am unable to change the position of the vertical menu with out changing the position of the hole document and I don't really have a clue of how the css works in this one.
Can any one help out?=

link

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title> Stu Nicholls | CSSplay | CSS paged menu 2</title>
  6.  
  7.  
  8. <style type="text/css">
  9. /* ================================================================ 
  10. This copyright notice must be untouched at all times.
  11.  
  12. The original version of this stylesheet and the associated (x)html
  13. is available at http://www.cssplay.co.uk/menus/page_menu2.html
  14. Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
  15. This stylesheet and the associated (x)html may be modified in any 
  16. way to fit your requirements.
  17. =================================================================== */
  18.  
  19. #hoverpage ul#outer li div p {font-size:11px; line-height:16px; margin:5px 0 15px 0;}
  20. #hoverpage ul#outer li div h2 {line-height:1em; color:#585; font-size:1.5em; font-weight:normal; margin-top:0; font-family:verdana, sans-serif;}
  21. #hoverpage ul#outer li div h3 {line-height:1em; color:#66a; font-size:1.2em; font-weight:normal; margin-top:0;}
  22. #hoverpage ul#outer li div h3.clear {clear:left;}
  23.  
  24.  
  25. #hoverpage {width:650px; height:450px; border:1px solid #aaa; background:#fff; position:relative; z-index:500; overflow:hidden; text-align:left;}
  26. #hoverpage table {border-collapse:collapse; margin:-1px;}
  27. #hoverpage ul#outer {background:transparent; padding:0; margin:0;list-style:none;}
  28.  
  29. #hoverpage ul#outer li.page {display:inline;} /* needed for IE to function correctly */
  30.  
  31. #hoverpage ul#outer li.page a.menuitem {text-decoration:none;}
  32.  
  33. #hoverpage ul#outer li.page i {position:absolute; display:block; height:25px; right:500px; background:transparent; cursor:default; z-index:100; text-align:right; text-decoration:none; color:#080; font-style:normal; cursor:pointer;}
  34.  
  35. #hoverpage ul#outer li.p1 i {top:30px;}
  36. #hoverpage ul#outer li.p2 i {top:55px;}
  37. #hoverpage ul#outer li.p3 i {top:80px;}
  38. #hoverpage ul#outer li.p4 i {top:105px;}
  39. #hoverpage ul#outer li.p5 i {top:130px;}
  40.  
  41.  
  42. #hoverpage ul#outer li.page div {display:block; width:600px; height:400px; padding:25px; font-weight:normal; color:#444;}
  43. #hoverpage ul#outer li.p1 div {background:#fff url(images/page1_back.jpg);}
  44. #hoverpage ul#outer li.p2 div {background:#fff url(images/page2_back.jpg);}
  45. #hoverpage ul#outer li.p3 div {background:#fff url(images/page3_back.jpg);}
  46. #hoverpage ul#outer li.p4 div {background:#fff url(images/page4_back.jpg);}
  47. #hoverpage ul#outer li.p5 div {background:#fff url(images/page5_back.jpg);}
  48.  
  49. #hoverpage ul#outer li div img {border:1px solid #888; float:right; margin:0 10px 5px 0;}
  50. #hoverpage ul#outer li div p.big {line-height:1em; color:#004; font-size:1.5em;}
  51. #hoverpage ul#outer li div a {color:#00c; text-decoration:underline;}
  52. #hoverpage ul#outer li div em {display:block; width:190px; height:230px; float:left; background:transparent url(images/current.gif) no-repeat; margin-right:10px;}
  53.  
  54. #hoverpage ul#outer li.p1 div em {background-position: 21px 0;}
  55. #hoverpage ul#outer li.p2 div em {background-position: 21px 25px;}
  56. #hoverpage ul#outer li.p3 div em {background-position: 21px 50px;}
  57. #hoverpage ul#outer li.p4 div em {background-position: 21px 75px;}
  58. #hoverpage ul#outer li.p5 div em {background-position: 21px 100px;}
  59.  
  60. #hoverpage ul#outer li.page div a:hover {text-decoration:none;}
  61.  
  62. #hoverpage ul#outer li.page a:hover {white-space:normal;} /* for IE6 */
  63.  
  64. #hoverpage ul#outer :hover div {position:absolute; left:0; top:0;}
  65. #hoverpage ul#outer a:hover i {color:#66a; font-weight:bold;} /* for IE6 */
  66. #hoverpage ul#outer :hover a i {color:#66a; font-weight:bold;}
  67.  
  68. #hoverpage ul#outer div ul li {line-height:20px; font-size:0.9em; color:#256; list-style-type:disc;}
  69. #hoverpage ul#outer div ul li a {line-height:20px; font-size:1.1em; color:#c00;}
  70.  
  71. #hoverpage ul#outer div dl dd {line-height:20px; font-size:1.1em; color:#448;}
  72. #hoverpage ul#outer div dl dt {line-height:30px; font-size:1.3em; color:#333;}
  73.  
  74.  
  75. <*-----------------------------------------Css ends----------------------------------------------------------------------------------------------
  76. ---------------------------------------->
  77.  
  78. </style>
  79.  
  80.  
  81.  
  82. </head>
  83.  
  84.  
  85. <body id="www-cssplay-co-uk">
  86.  
  87. <div id="showcase"><div id="info">
  88.       <div id="hoverpage">
  89.  
  90. <ul id="outer">
  91. <li class="page p1"><a href="#nogo" class="menuitem"><i>Products</i><!--[if IE 7]><!--></a><!--<![endif]-->
  92. <!--[if lte IE 6]><table><tr><td><![endif]-->
  93. <div>
  94. <em></em>
  95. <img src="images/bags.jpg" alt="" />
  96. <h2>Products</h2>
  97. <h3>Lorem Ipsum</h3>
  98. <ul>
  99. <li><a href="#nogo1">Integer nonummy neque.</a></li>
  100.  
  101. <li><a href="#nogo1">Aliquam accumsan.</a></li>
  102. <li><a href="#nogo1">Nulla in sapien eget eros.</a></li>
  103. <li><a href="#nogo1">Nam varius ante et risus.</a></li>
  104. <li><a href="#nogo1">Phasellus at erat id metus.</a></li>
  105. <li><a href="#nogo1">Donec malesuada ultricies.</a></li>
  106. <li><a href="#nogo1">Duis quis purus sit amet.</a></li>
  107. <li><a href="#nogo1">Morbi porta dapibus enim.</a></li>
  108. </ul>
  109. <h3 class="clear">Product Information</h3>
  110.  
  111. <p>Suspendisse potenti. Donec viverra molestie enim. Fusce fermentum, erat id cursus aliquam, mauris augue volutpat dolor, in interdum purus pede dictum diam. Morbi interdum diam at ligula. Morbi laoreet. Morbi mollis tristique justo. Etiam accumsan fermentum ipsum. Phasellus vestibulum, leo in dapibus ultricies, nisi nulla fermentum tortor, eu lobortis nibh urna ac dui. Aliquam erat volutpat. Curabitur vitae sapien sed libero dictum pellentesque. Praesent quis enim nec tellus congue hendrerit. Ut tellus. Morbi rhoncus elit lobortis libero.</p>
  112. </div>
  113. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  114. </li>
  115. <li class="page p2"><a href="#nogo" class="menuitem"><i>Services</i><!--[if IE 7]><!--></a><!--<![endif]-->
  116. <!--[if lte IE 6]><table><tr><td><![endif]-->
  117. <div>
  118. <em></em>
  119. <img src="images/service.jpg" alt="" />
  120. <h2>Services</h2>
  121. <h3>Curabitur eget</h3>
  122. <ul>
  123. <li><a href="#nogo2">Suspendisse potenti.</a><br />Quisque at ante nec lacus cursus malesuada.</li>
  124.  
  125. <li><a href="#nogo2">Donec viverra molestie enim.</a><br />Sed ac tortor nec augue hendrerit pulvinar.</li>
  126. <li><a href="#nogo2">Pellentesque habitant.</a><br />Nullam rhoncus hendrerit orci.</li>
  127. <li><a href="#nogo2">Vivamus non turpis.</a><br />Sed lacinia egestas mi.</li>
  128. </ul>
  129. <h3 class="clear">Available Services</h3>
  130. <p>Proin scelerisque justo quis ante. Maecenas vehicula orci quis arcu. Nam dictum lectus quis ipsum. In felis. Cras eu lectus. Nam sed est ut orci venenatis faucibus. Ut molestie massa non massa. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Curabitur eget magna a odio vestibulum laoreet. Vivamus faucibus tincidunt massa. Sed a nunc. Quisque varius sagittis libero.</p>
  131. </div>
  132. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  133. </li>
  134.  
  135. <li class="page p3"><a href="#nogo" class="menuitem"><i>Latest Information</i><!--[if IE 7]><!--></a><!--<![endif]-->
  136. <!--[if lte IE 6]><table><tr><td><![endif]-->
  137. <div>
  138. <em></em>
  139. <img src="images/news.jpg" alt=""  />
  140. <h2>Latest Information</h2>
  141. <h3>Fusce fermentum</h3>
  142. <ul>
  143. <li><a href="#nogo3">Donec posuere enim a sapien.<br />Malesuada fames ac turpis egestas.</a></li>
  144. <li>Vivamus dignissim tincidunt quam.</li>
  145. <li>Nullam varius vestibulum mauris.</li>
  146.  
  147. <li>Curabitur faucibus varius dui.<br /><a href="#nogo3">Cras suscipit viverra felis. Nullam diam.</a></li>
  148. <li>Vivamus convallis volutpat nunc.</li>
  149. <li>Sed porttitor dui vel nunc.</li>
  150. </ul>
  151. <h3 class="clear">Latest Product Information</h3>
  152. <p>Nam porttitor congue diam. Donec in mi. Fusce ac neque. Donec quis justo. Nunc non justo quis augue sagittis volutpat. Etiam quis ligula commodo augue tempus pulvinar. Morbi ante arcu, aliquam ut, consequat et, consequat sed, sem. Cras suscipit viverra felis. Nullam diam. Duis eros purus, ornare sit amet, viverra sed, laoreet ac, pede.</p>
  153. </div>
  154. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  155. </li>
  156. <li class="page p4"><a href="#nogo" class="menuitem"><i>Press Release</i><!--[if IE 7]><!--></a><!--<![endif]-->
  157.  
  158. <!--[if lte IE 6]><table><tr><td><![endif]-->
  159. <div>
  160. <em></em>
  161. <img src="images/press.jpg" alt="" />
  162. <h2>Press Release</h2>
  163. <h3>Quisque varius</h3>
  164. <dl>
  165. <dt>11th June 2007</dt>
  166. <dd>In feugiat scelerisque pede.</dd>
  167. <dd>Morbi iaculis eleifend ante.</dd>
  168. <dd>Maecenas fringilla scelerisque erat.</dd>
  169.  
  170. <dd>Nam <a href="nogo5">accumsan</a> egestas eros.</dd>
  171. </dl>
  172. <h3 class="clear">News and Information</h3>
  173. <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse vitae sem. <a href="nogo5">Class aptent taciti</a> sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Donec ut nunc. <a href="nogo5">In dictum, dui nec vehicula vehicula</a>, neque leo faucibus est, porta vehicula nisi odio eu tellus.</p>
  174. </div>
  175. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  176.  
  177. </li>
  178. <li class="page p5"><a href="#nogo" class="menuitem"><i>Contact us</i><!--[if IE 7]><!--></a><!--<![endif]-->
  179. <!--[if lte IE 6]><table><tr><td><![endif]-->
  180. <div>
  181. <em></em>
  182. <img src="images/contact.jpg" alt="" />
  183. <h2>Contact us</h2>
  184. <h3>Donec condimentum</h3>
  185. <ul>
  186. <li>Phasellus vitae arcu et mauris facilisis ornare.</li>
  187. <li>Nullam ultrices <a href="#nogo5">urna nec erat</a> facilisis faucibus.</li>
  188.  
  189. <li>Ut cursus posuere eros.</li>
  190. <li>Vestibulum <a href="#nogo5">dapibus</a> tortor eu nisl.</li>
  191. <li>Proin ac mauris non lacus pharetra aliquet.</li>
  192. </ul>
  193. <h3 class="clear">Contact Details</h3>
  194. <p>Praesent vehicula interdum massa. Nunc velit erat, pulvinar vitae, tempor non, porttitor non, ipsum. Nullam venenatis, quam a tincidunt semper, neque velit dictum quam, at mattis mauris mauris a dolor. Aliquam urna. <a href="nogo5">Ut pellentesque dapibus quam.</a> Mauris dapibus dictum felis. Praesent tellus quam, aliquet in, malesuada aliquet, pretium non, eros. Cras aliquam ligula vitae nunc.</p>
  195.  
  196. </div>
  197. <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  198. </li>
  199. </ul>
  200. </div>
  201.  <!-- end of info -->
  202.  
  203. <br class="clear" />
  204. </div> <!-- end of showcase -->
  205. <!-- end of content -->
  206. </div>
  207.     <!-- end of wrapper -->
  208.  
  209.  
  210. </body>
  211. </html>
Jan 25 '08 #1
1 2404
harshmaul
490 Recognized Expert Contributor
That is clever but very complicated css. maybe break it down to find exactly what you want to move to where.

how do you want the menu displaying?

without spending too much time on it this makes it go across the top. just needs the widths sorting out.



#hoverpage ul#outer li.p1 i {top:0px; left:0px;}
#hoverpage ul#outer li.p2 i {top:0px; left:150px;}
#hoverpage ul#outer li.p3 i {top:0px; left:300px;}
#hoverpage ul#outer li.p4 i {top:0px; left:450px;}
#hoverpage ul#outer li.p5 i {top:0px; left:600px;}
Jan 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
17485
by: Nikolaos Giannopoulos | last post by:
If I have simplified html (I have removed height, weight, alt, etc... attributes to simplify the example) such as: <div id="header"> <a href="blah.html"><img src="img/blah.jpg"></a> </div> and the following CSS rule to apply a background color to text links on hover:
12
6022
by: Alan J. Flavell | last post by:
OK, today's email brought a comment from a reader, pointing out something that I'd long since noticed myself but hadn't done anything about it. On my pages, I've got a first-letter style on paragraphs. So far, so good: some of the paragraphs begin with a link, and there are styles in the stylesheet for link, hover etc. The first letter is still displayed as styled for the paragraph's first-letter.
5
14634
by: Thomas Mlynarczyk | last post by:
Hello, I want to style an <a> element to have a special padding on "hover", like a {padding: 3px 5px 2px 4px;} a:hover {padding: 2px 4px 3px 5px;} No problem for Mozilla. Opera 7, however, behaves strangely and does not apply the background color to the padded area. And IE5 seems to ignore the hover-padding.
0
1505
by: riki | last post by:
hi, i'm doing some tutorial with CSS (it's not my design!!!) and have a little problem...i've posted the source as well so you could see what i'm talking about...when i roll with mouse over link >>The Bio<< text get's bold and that is what i wan't to do in the first place...but, if you notice the other 2 paragraphs beeneath that link move downwards...the Q: is, how can i correct this so everything stays in place? thanks.
1
1341
by: false-name | last post by:
is this a known IE bug/quirk ? a not-very-complex web page with several <div> ( some of those <div> nested ) with navigation by menu links down the left and near the top using CSS a:link and a:hover to modify link color and background-color running on WinXP SP2
5
3782
by: Harris Kosmidhs | last post by:
I have two questions for my site http://www.solsoft.gr/index.php (it's in greek but don't mind ;-) ). 1)Div for #logo (top-left image) and the menu (left side) is 200px. Why isn't the same in IE? (FF works OK) 2) I have created a hover effect for the left menu. Why isn;t IE shows the same stuff as FF? thanks a lot
4
2961
by: Andreas Borutta | last post by:
Hi, what is the task with which I could not cope? There is a link with an inline-element (strong e.g.) inside. It has a higher font-size than the content of its parent. For the hover effect I prefer an inverse styling. Hovering should just cover the link and not his parent (li e.g.).
7
27497
by: fredo | last post by:
I've studied Eric Meyer's pure css popups, version two: http://meyerweb.com/eric/css/edge/popups/demo2.html which pops up an image when I roll over a text link. Now I want to pop up a large image when I roll over a thumbnail. I've tried some things, but can't make it work. See here (Warning: adult matter):
8
6547
by: Haines Brown | last post by:
I want a hot text string to display an image only when hovered. In the body: .... <a id="link-a" href="#nogo"> <img id="photo" src="..." />hot text </a> ....
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.