centering a variable width div

tominated

macrumors 68000
Original poster
Jul 7, 2006
1,724
0
Queensland, Australia
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!
 

jng

macrumors 65816
Apr 6, 2007
1,012
0
Germany
I use variable width divs (measured in ems) and they center fine with margin: 0 auto;
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,842
7
USA
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.