Hey all, I am getting frustrated with this one, I can't get a menu to auto center for some strange reason. Huxley Forum On the main site I have it looking how I want it no problem but for some reason in my forum it seems as though it just does not want to respond to what I want it to do. I guess it is inheriting something somewhere but have no idea what. Would really appreciate any help on this one, thanks!
From what I've seen so far you already have a 10px leak here: ul#headnav li a{ float: left; text-align: center; color: white; text-decoration: none; background-image:url(/images/buttons/buttons.gif); background-position: top; width: 150px; line-height: 25px; margin: 7px 10px 0px [COLOR="Red"][B]10px[/B][/COLOR]; padding: 0; } Code (markup): I'm still looking, but you're not that far off center. Maybe try putting text-align:center in your header-03.
I review your site, the menus are in center. where is the problem ? I can help you with the problem. hello, faithnomoread margin: 7px 10px 0px ; (equals to margin-top:7px; margin-left:10px; margin-right:10px; margin-bottom:0px) margin: 7px 10px 0px 10px; (equals to margin-top:7px; margin-left:10px; margin-right:10px; margin-bottom:0px) The two type of css are the same meaning .
The order is top, right, bottom, left, but the margin-right causes the menu to be 10px too far to the right.
You are right . But margin: 7px 10px 0px ; margin: 7px 10px 0px 10px; the two are the same. If you write css like margin: figureA px figureB px figureC px ; the first figure means margin top. the second figure means both left and right margin. the third figure means the margin bottom.
Thank you, I had wondered about that, when I usually come to something like that I just usually set each side: margin-left, margin-right, etc... I see there's a 30 px gap between the header and the menu so there is leeway there.
If you write css like margin: figureA px figureB px figureC px ; (css shorten) In this case , you have to set left and right margin to the same figure . If you would like to set different figures, you should use four figures as normal .
It seems VB have a class for the menu anyway. So try this: <style> .vbmenu_option { text-align: center; } </style> Sorry if it does not work, i have never played with VB before.
Why not set the left/right margins to auto? The 10px margin on the right wont make a difference if the content of the div doesn't go right to the edge of where it should be.