473,463 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

problems with text align in horizontal menu

2
I have a problem with making horizontal menu with css. The problem is that menu should be right aligned, but items in sub menus should be left aligned.

To make horizontal menu float:right property is used on DIV tag where menu is located.

This is an example of menu:

Expand|Select|Wrap|Line Numbers
  1. <DIV id="menu">
  2. <UL>
  3.   <LI><A>Item1</A>
  4.     <UL>
  5.     <LI><A>Item1.1</A></LI>
  6.     </UL>
  7.   </LI>
  8.   <LI>Item2
  9.     <UL>
  10.     <LI><A>item2.1</A></LI>
  11.     </UL>
  12.   </LI>
  13. </UL>
  14. </DIV>
With my style, this code is correctly displayed only in IE, in other browsers sub menus are appearing in unpredictable places. Menu formating is also correct only in IE.

page can be found here <http://nashe-vesillia.com/index_main.html>. Only IE is able to show this page in the same way as it should be.
May 21 '10 #1
2 1980
hey mate...

just from a quick look i would imagine that you should be putting some end codes on stuff...

Expand|Select|Wrap|Line Numbers
  1. <div id="menu">
  2. <ul>
  3. <li><a href="#">Item 1a</a></li>
  4. <li><a href="#">Item 2a</a></li>
  5. <li><a href="#">Item Folder 3a</a>
  6.     <ul>
  7.     <li><a href="#">Sub Item 3.1a</a></li>
  8.     <li><a href="#">Sub Item 3.2a</a></li>
  9.     <li><a href="#">Sub Item 3.3a</a></li>
  10.     <li><a href="#">Sub Item 3.4a</a></li>
  11.     </ul>
  12. </li>
  13. <li><a href="#">Item 4a</a></li>
  14. <li><a href="#">Item Folder 5a</a>
  15. </div>
  16.  
hope that helps you.

cya
-MusoFreak200-
May 22 '10 #2
taras
2
@MusoFreak200
thanks for the code, but can you help with css code. How can i make right align menu, with sub menu opening when mouse is on it?
May 24 '10 #3

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

Similar topics

2
by: Ansgar Hein | last post by:
I have been playing around with several different versions for a horizontal menu, but I haven't been able to build a horizontal navigation based on the vertical one featured on www.alistapart.com...
7
by: Stan Brown | last post by:
http://www.acad.sunytccc.edu/instruct/sbrown/stat04/qz05_.htm A table comes near the beginning of the page. I have the <td> of row 1 column 1 styled in line with border-top:none and...
7
by: Robert Nicholson | last post by:
So I've got one page where I have an image inside a DIV with text-align: center and the image is correctly centered in that block. Making me think that text-align will center the contents of a...
5
by: Peter Cartwright | last post by:
This works in IE6. A horizontal menu made from a table with the space created by a td class="gap". All tds are rendered as inline elements except for .gap. So links are equidistantly spaced. This...
2
by: Craig van Nieuwkerk | last post by:
Hi. I am trying to create a horizontal menu like the one here http://www.milonic.com/menusample25.php where the drop down menu for each item it horizontal on a new row instead of vertical. Another...
3
by: Mike Stephens | last post by:
This is very simple and for the life of me the solution escapes me. How can I align a context menu to the right button of a button? Regards, Mike
2
by: Sergio E. | last post by:
Hi group, I write this post with the following question: How can I to build an absolutely horizontal menu?, This is because I can't find how can I configure the menu component of asp.net 2.0...
0
by: nonsensitor | last post by:
I would like to provide a scalable horizontal menu. Here's the twist: I want to keep the menu items on a single line for as many 'upscales' as possible. So I basically need 2 solutions: 1) For...
3
by: lanoak | last post by:
Hi, new hear and just starting out in CSS so I'm sure this is something simple. I'm trying to build a horizontal menu bar with 5 different headings: home, process, policies and proceedures,...
1
by: Emil | last post by:
Hello, I'm using asp.net 2.0. I have a horizontal menu control. The children menu items are center aligned when shown. How can I change the alignment of the dynamic menu items to be left aligned?...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.