473,327 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Horizontal Menu Lining Up Vertically

It is late so this is probably something really obvious but I am not seeing it. Can someone please help?

Here is the page in question:
html - http://www.itsyourplate.com/index2.php
css - http://www.itsyourplate.com/thin.css

As you can see from the file the menu is showing up vertically not horizontally. I copied the code directly from another site I have done and changed the bullets (I didn't want any) and the colors but I must have jacked the css up somehow.

Here is the other site that I have done this style of menu on before.

html - http://www.metrobelievers.com
css - http://www.metrobelievers.com/style.css

I have tried adding css tags like
Expand|Select|Wrap|Line Numbers
  1. #menu ul li {display: inline; } 
but that hasn't worked...I'm really just out of options because I can't see what the issue is, I'm too close to it I guess.

Thank you in advance for any help.
May 14 '09 #1
7 5526
drhowarddrfine
7,435 Expert 4TB
I can't find it yet but you have display:block scattered throughout the li and a of #menu which is probably causing the problem.
May 14 '09 #2
If I change the display: blocks to something else then the sub menus don't display as a block of items...I will look into the other thing you wrote about when I get back to the office
May 14 '09 #3
drhowarddrfine - thanks for the info, I have tried removing all of the display:block commands to no avail as well as removing the problematic #menu command.

The part that is frustrating is that I know this set of css commands works because I have it working on another site so I just have a typo or miscopy somewhere. Thank you for your help, please send any more suggestions that you have.

EDIT: after more investigation, the code that was copied in is intact, it is something on one of the parent objects that it is inheriting that is causing the problem. (I copied the code directly from the other site without modifications and it did the same thing).
May 14 '09 #4
drhowarddrfine
7,435 Expert 4TB
Sorry for not replying. I'm out of town till Monday.
May 15 '09 #5
prabirchoudhury
162 100+
ok.. here you go

add this css menu part in your css page

Add this part on your css page..

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. /* this css for new menu*/
  4.  
  5. /*
  6. menubar is the root UL and menubar ul applies to all the sub-menu ULs.
  7. We set padding and margin to zero to eliminate all indentation, turn bullets off,
  8. and set a font-family different from the global font-family declared for the
  9. body element above. This sets font for just the menu. Do not add a font-size here.
  10. */
  11. #menubar, #menubar ul {
  12.     padding: 0;
  13.     margin: 0;
  14.     list-style: none;
  15.     font-family:  Tahoma, Arial;
  16.     font-weight: bold;
  17. }
  18. /*
  19. Root-Level Links.  Do not change the first two properties.
  20. Adjust padding values to make the root links taller and to offset them
  21. from the left and right edges of the link box. The border right creates a
  22. separator between links. Font-size is set here and will apply to all menu levels.
  23. Font color is set to light gray.
  24. */
  25. #menubar a {
  26.     display: block;
  27.     text-decoration: none;
  28.     padding: 5px 10px 5px 10px;
  29.     border-right: 1px solid #333;
  30.     font-size: .85em;
  31.     color: white;
  32.  
  33. }
  34. /*
  35. Class assigned to those Root-Level links that have associated Sub-Menus.
  36. The top and bottom padding assigned this element must be the same as
  37. that assigned to the menubar a element. The right padding is increased
  38. to accomodate the display of background image depicting a downward
  39. pointing arrow.
  40. */
  41. #menubar a.trigger {
  42.     padding: 5px 16px 5px 10px;
  43.     background-repeat: no-repeat;
  44.     background-position: right center;
  45.  
  46.  
  47. }
  48. /*
  49. The Root-Level list items. Floating left allows
  50. them to appear horizontally. Width is for IE5 Mac. The last rule in
  51. this style sheet will set the width for this element to auto for all
  52. other browsers - hiding it from IE5 Mac. The width is proportional.
  53. As you add and edit root menu items, you will need to test this width
  54. to ensure it is wide enough to accomodate all text.
  55. */
  56. #menubar li {
  57.     float: left;
  58.     width: 9em;
  59.  
  60. }
  61. /*
  62. Sets width for Sub-Menu box and the List Items inside - in proportional em units. 
  63. This allows the sub-menu width to expand if users resize the text in their browsers.
  64. */
  65. #menubar li ul, #menubar ul li  {
  66.     width: 10em;
  67. }
  68. /*
  69. The sub-menu links. We set color and turn off the right border, which
  70. would otherwise be inherited from the root link rule. We set top and 
  71. bottom padding less than the root items and increas the left padding
  72. to indent the sub-menu links a small amount in from the root links.
  73. */
  74. #menubar ul li a  {
  75.     color: #565656;
  76.     border-right: 0;
  77.     padding: 3px 12px 3px 16px;
  78.     background-color: #FFFFFF;
  79. }
  80. /*
  81. Sub-Menu Unordered Lists describes each dropdown sub-menu grouping. 
  82. Positioned Absolutely to allow them to appear below their root trigger.
  83. Set to display none to hide them until trigger is moused over.
  84. Background Color must be set or problems will be encountered in MSIE.
  85. Right and bottom borders are set to simulate a raised look.
  86. A gradient background image is assigned.
  87. */
  88. #menubar li ul {
  89.     position: absolute;
  90.     display: none;
  91.     background-color: #FFFFFF;
  92.     border-right: 1px solid #333333;
  93.     border-bottom: 1px solid #333333;
  94.     background-repeat: repeat-x;
  95.  
  96. }
  97. /*
  98. Changes the Text color and background color when the Root-Level
  99. menu items are moused over. The second selector sets color and background
  100. when Root-Level items are accessed with the keyboard tab key. The third
  101. selector sets an active state to support keyboard access in MSIE. The fourth 
  102. selector is assigned to IE5 and IE6 Windows via the script.
  103. Note that IE7 supports hover on elements other than links and so behaves
  104. like Firefox, Opera, and Safari - making the menu operable even if JavaScript
  105. is not enabled.
  106. */
  107. #menubar li:hover a, #menubar a:focus,
  108. #menubar a:active, #menubar li.p7hvr a {
  109.     color: #000000;
  110.     background-color: #cfbe8a;
  111. }
  112. /*
  113. Set the Sub-Menu UL to be visible when its associated
  114. Root-Level link is moused over. The second selector is 
  115. assigned to IE5 and IE6 via the script.
  116. */
  117. #menubar li:hover ul, #menubar li.p7hvr ul {
  118.     display: block;
  119.     background-color: #cfbe8a;
  120.  
  121. }
  122. /*
  123. Sets the Text color of the Sub-Level links when the Root-Level
  124. menu items are moused over. The second selector is 
  125. assigned to IE5 and IE6 via the script.
  126. The color set should march the normal Sub-Level link color
  127. in the rule: #menubar ul li a. The background color must be
  128. transparent to allow the underlying gradient background on the UL
  129. to show through.
  130. */
  131. #menubar li:hover ul a, #menubar li.p7hvr ul a {
  132.     color: #000000;
  133.     background-color: transparent;
  134.  
  135. }
  136. /*
  137. The normal hover class for Sub-Level links. The Important directive
  138. is required for older browsers. We set a background color, which shows
  139. over the gradient background. We set text color to white.
  140. */
  141. #menubar ul a:hover {
  142.     background-color: #606060!important;
  143.     color: #FFFFFF!important;
  144. }
  145. /* The single backslash \ character inside this comment
  146. causes IE5 Mac to ignore the following rule, which allows other
  147. browsers to render top-level menu items to their natural width.
  148. Do not edit this rule in any way. */
  149. #menubar li {width: auto;}
  150.  
  151.  
  152.  

i have added the menu on this page just copy and add on this on your menu and replace with old code

Expand|Select|Wrap|Line Numbers
  1.  
  2. <div id="menutop" > <!-- this is your div already decleared -->
  3.             <div id="menuwrapper">
  4.  
  5.                 <ul id="menubar">
  6.                     <li>
  7.               <a href="index2.php" class="transparent">Home</a>
  8.             </li>
  9.                 <li><a href="">About T.Hi.N.</a>
  10.           <ul>
  11.             <li><a href="">Tracie Hittman</a></li>
  12.                             <li><a href="">Press</a></li>
  13.                             <li><a href="">My Philosophy</a></li>
  14.                             <li><a href="">Events</a></li>
  15.                             <li><a href="">Testimonials</a></li>
  16.           </ul>
  17.       </li>
  18.       <li><a href="">The 180 Diet</a>
  19.           <ul>
  20.             <li><a href="">The Principles</a></li>
  21.                         <li><a href="">Get Balanced</a></li>
  22.           </ul>
  23.       </li>
  24.       <li><a href="" class="transparent">Services</a>
  25.       </li>
  26.       <li><a href="" class="transparent">Contact Us</a>
  27.       </li>
  28.     </ul>
  29.    </ul>
  30.  </div>
  31.  </div>
  32.  
  33.  
i have tested on your page should wrk alright
May 17 '09 #6
prabirchoudhury - Thank you so much, I will be trying this out either later today or tomorrow. You rock!!!
May 17 '09 #7
prabirchoudhury - this worked like a charm, thanks a lot.
May 18 '09 #8

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

Similar topics

1
by: Maria Gonzalez | last post by:
Hello, I would like to know if it is possible to create a Navigational Menu that has all the Major Categories on top row, then when a mouse is over it, the bottom row appears with sublinks but...
13
by: elad | last post by:
Hi The Menu doesn't work properly when I have 2 frame and the Menu popup frame=document target frame, when I choose item in the menu the doc opened and the menu get stuck. Here is the code...
5
by: Jsp | last post by:
I created a vertically scrolling div. On initial rendering, Firefox shows a horizontal scrollbar in this div, over the complete width. Resizing the width of the window/viewport makes the horizontal...
14
by: Dave | last post by:
My web site is not particularly theme-based, but it contains an Art Gallery I'd like to display in a different perspective. I would like to horizontally scroll it, rather than vertically - as if...
0
by: itzikkl | last post by:
hello i wanted to ask about the menu control in asp.net 2.0. there is a property "Orientation" in the menu cotrol which specifies the Orientation of the main-uppper-level menu items. than the...
4
by: Adam | last post by:
I have four roughly square DIVs, all the same height, which I need to line up horizontally across the page. What would be the best way to do this? At the moment I have a very botched solution where...
5
Haitashi
by: Haitashi | last post by:
Hello everyone: I have a CFMenu with the type set to horizontal. I'd like to have the sub-menu items open vertically. Is that possible? Here is my code. I want the Portals sub-menu (Portal A,...
19
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.