Home › Forums › CSS › Trying to center menu › Reply To: Trying to center menu
November 22, 2014 at 12:28 pm
#188988
Paulie_D
Member
You can do this
.html_header_top.html_bottom_nav_header .main_menu>div, .html_header_top.html_bottom_nav_header .main_menu ul:first-child {
width: 100%;
height: 35px;
text-align: center; /* will center INLINE-BLOCK list items */
}
INLINE-BLOCK THE li
.av-main-nav li {
/* float: left; <em>/ /</em> remove this <em>/
position: relative;
z-index: 20;
display: inline-block; /</em> here */
}
Note this will cause your search icon/box to displace because it has float:right
.
If you remove that it will center with the rest.