2
votes

enter image description hereI'm using divi theme for a wordpress site. The top primary menu is right aligned by default. How can I customize it to have it center aligned?

Code :

@media only screen and ( min-width: 981px ) {

/* Vertically center the top navigation */
#et-top-navigation { vertical-align: middle; float:none !important;}
.container { display:table; }

/* Center align the contents of the top navigation area */
#et-top-navigation { text-align:center; }
#et-top-navigation > * { text-align:left; }

#top-menu-nav, #et_top_search { float:none !important; display:inline-block !important}
#et_top_search { vertical-align: top !important; margin-top:3px }

}

1

1 Answers

0
votes

In the future I would suggest asking the question better since this one provides too little information to help solve the problem. Fortunately, I now Divi well. Here is your solution.

In your stylesheet:

#et-top-navigation {
    float: none; 
    text-align: center; 
}

nav.fullwidth-menu-nav {
   float: none;
}