Results 1 to 5 of 5

Thread: css center menu

  1. #1
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default css center menu

    i am trying to use this menu
    http://www.dynamicdrive.com/style/cs...rop_line_menu/
    and have not been able to center it correctly on my page. i have tried adding auto margins to the css but it isn't responding in the manner i desired. thanks for any help

  2. #2
    Join Date
    Jun 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Its hard to tell what could be wrong without seeing the code but are you sure that you are not trying to auto centre your div box inside another div that isn't centred?

    Have you checked that you have the valid doc type required for this menu?

  3. #3
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    even when i just have the menu by itself with no code and mess with the css,i can't center it, that's why it is so frustrating for me. i will keep working on it though,thanks!

  4. #4
    Join Date
    Jun 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Once again it is hard to know your problem without seeing your HTML or CSS code.

    You could try this:

    In your CSS:
    Code:
    body {
        text-align: centre;
    }
    This fixes a problem with some browsers but places all your text in the centre. To solve this:
    Code:
    #wrapper {
        margin: 0 auto;
        text-align: left;
    }
    and your HTML:
    HTML Code:
    <html>
    <body>
         <div id="wrapper">
             All your content will be placed here...
         </div>
    </body>
    </html>

  5. #5
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    It's also center not centre.

Bookmarks

Posting Permissions

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