Center Menu Text
Permalink Browser Info Environment
In the menu options you can align the text LEFT or RIGHT. That is great, but I want to align the menu items to the CENTER. I've looked all over in the CSS to see if I couldn't determine a way to do this, even added a div align center tag around the block in my template and that didn't do it. I could stretch it the length of the page, but I don't want that effect - spacing is great as is, just want it centered.
Ideas?
Ideas?
Type: | Discussion |
---|---|
Status: | New |
Hi -thanks - this is exactly what I needed. Worked great. I would have never guessed that!!!
And here's a centered text example:
see screenshot
<style> div#header-area-inside div ul.sf-menu li { text-align:center; } </style> <? ?>
see screenshot
To get the ul element centered within it's container div you need to specify a width for the menu. This makes it a little less flexible because when you add new top level elements you'd need to change that width.
Here's some example css:
see the attached screenshot to see the results.