problems with text align in horizontal menu

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • taras
    New Member
    • May 2010
    • 2

    #1

    problems with text align in horizontal menu

    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:

    Code:
    <DIV id="menu">
    <UL>
      <LI><A>Item1</A>
        <UL>
        <LI><A>Item1.1</A></LI>
        </UL>
      </LI>
      <LI>Item2
        <UL>
        <LI><A>item2.1</A></LI>
        </UL>
      </LI>
    </UL>
    </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.
  • MusoFreak200
    New Member
    • Oct 2009
    • 96

    #2
    hey mate...

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

    Code:
    <div id="menu">
    <ul>
    <li><a href="#">Item 1a</a></li>
    <li><a href="#">Item 2a</a></li>
    <li><a href="#">Item Folder 3a</a>
    	<ul>
    	<li><a href="#">Sub Item 3.1a</a></li>
    	<li><a href="#">Sub Item 3.2a</a></li>
    	<li><a href="#">Sub Item 3.3a</a></li>
    	<li><a href="#">Sub Item 3.4a</a></li>
    	</ul>
    </li>
    <li><a href="#">Item 4a</a></li>
    <li><a href="#">Item Folder 5a</a>
    </div>
    hope that helps you.

    cya
    -MusoFreak200-

    Comment

    • taras
      New Member
      • May 2010
      • 2

      #3
      Originally posted by MusoFreak200
      hey mate...

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

      Code:
      <div id="menu">
      <ul>
      <li><a href="#">Item 1a</a></li>
      <li><a href="#">Item 2a</a></li>
      <li><a href="#">Item Folder 3a</a>
      	<ul>
      	<li><a href="#">Sub Item 3.1a</a></li>
      	<li><a href="#">Sub Item 3.2a</a></li>
      	<li><a href="#">Sub Item 3.3a</a></li>
      	<li><a href="#">Sub Item 3.4a</a></li>
      	</ul>
      </li>
      <li><a href="#">Item 4a</a></li>
      <li><a href="#">Item Folder 5a</a>
      </div>
      hope that helps you.

      cya
      -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?

      Comment

      Working...