• Resolved rowlandbrown

    (@rowlandbrown)


    I am trying to center the main navigation bar in my wordpress site using the css stylesheet. However, the obvious things that I have tried (reduce the width of the menu container and right and left align it auto) are not working. Any ideas?

Viewing 1 replies (of 1 total)
  • Thread Starter rowlandbrown

    (@rowlandbrown)

    I figured this out after much hair pulling. The basic problem was that the menu container was set to be the same size as the header. By removing:

    #access,

    from

    /* ABSOLUTE DIMENSIONS. */
    
    if ($mantra_dimselect=="Absolute") { ?>
    #wrapper, #access, #colophon, #branding, #main { width:<?php echo ($totalwidth) ?>px ;}

    in the custom-styles.php file, and adding:

    /* =Menu -PRIMARY
    -------------------------------------------------------------- */
    
    #access {
    	width:450px;
    	display: block;
    	margin: 0 auto;
    	margin-top:10px;
    	float:right;
    	position:relative;
    	left:-50%;
    	text-align:left;
    }

    and:

    #access ul {
    	margin-bottom:0px;
    	position:relative;
    	left:50%;

    to the style.css file, the problem was resolved.

Viewing 1 replies (of 1 total)
  • The topic ‘Center Main Navigation’ is closed to new replies.