centering a variable width div

Discussion in 'Web Design and Development' started by tominated, Aug 17, 2007.

  1. tominated macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia
    #1
    I am making a new template for rapidweaver, but the only problem is that the navigation menu doesn't centre. Because it is variable width, i can't use auto margins and don't have any other ideas. i tried googling it, but nothing works. please help!
     
  2. jng macrumors 65816

    jng

    Joined:
    Apr 6, 2007
    Location:
    Germany
    #2
    I use variable width divs (measured in ems) and they center fine with margin: 0 auto;
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    Can you give some code for context so we can see what you're currently attempting. Would make it a whole lot easier to give you answers this way.
     
  4. tominated thread starter macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia

Share This Page