Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2013
    Location
    Bristol, UK
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Aligning a sub menu css

    Hi,
    Under the 'menu' option on my site i need the links to appear side by side rather than one above the other?
    Any tips?

    My site is here

  • #2
    Senior Coder jerry62704's Avatar
    Join Date
    Oct 2007
    Location
    Springfield, IL
    Posts
    1,100
    Thanks
    13
    Thanked 87 Times in 87 Posts
    It's up to you what you want the site to look like. You have a bigger problem that the submenu items dont all appear unless you scroll over them.

    You should look to the CSS again with an eye to reduce the need for so many different classes on one thing, but YMMV.

    It takes too long to figure out why the menu is only partially shown given all those classes to wade through.

    Good luck.
    .
    .
    ...and gladly would he learn and gladly teach

    Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,740
    Thanks
    22
    Thanked 1,837 Times in 1,821 Posts
    Hello ChrisL_57,
    Your menu items will show fine once you get them to display side by side. The reason you can't see them till you hover over them is the li's that go beyond the 60px height of dropped ul are white text over that #eeeeee background.

    To make your dropped li's side by side, you would need to float them. Much like you did the li's in the parent ul.

    .../edit I see now you are floating the dropped li's. The problem is the 100% width. If the li is the full width of the ul, there is no room for another li to sit alongside.

    Try giving your dropped li's a width like this -
    Code:
    #main-menu .menu ul li {
        width: 100px;
    }


    A much simpler menu example can be seen here. Might give you some ideas.


    .
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    New Coder
    Join Date
    Jan 2013
    Location
    Bristol, UK
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you for your help Excavator.
    That's done the trick!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •