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 5 of 5
  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Centering a menu

    Hi,

    I'm using the menu that I got from this website - http://www.javascriptkit.com/script/...stopmenu.shtml

    It's sits more left than centered. Can anyone please help me. I want to center the menu. I've tried the <center> tags and the <p align="center"> tags, but that doesn't work. I don't know css or js very well, but it may be something in those files. Please help me center my menu on my pages. Thanks, Steve

  • #2
    New Coder
    Join Date
    Feb 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    anyone?

    Please help

  • #3
    New Coder
    Join Date
    Dec 2006
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it might be easier if we got a link to your site

  • #4
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    agree, it would have been nice to see what you have so far.

    Well, I didn't look at it so carefully, but it seems that the <ul> element is floated. This is why it is hard to center it.

    You may have to put it in a one-cell table (which will shrink in size depending on the content):
    Code:
    <table id="dummytable" cellspacing="0" cellpadding="0"><tr>
    <td>here goes your menu</td>
    </tr></table>
    together with:
    Code:
    #dummytable {
      margin: 0 auto;
    }
    I don't know if there are easier ways. Maybe someone else knows.

    Mainly, this is because we don't have full support for display: inline-block in IE.

  • #5
    New Coder
    Join Date
    Feb 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes!!! Putting it in a table worked...thanks so much man. Have a great weekend


  •  

    Posting Permissions

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