Community Forums › Forums › Archived Forums › Design Tips and Tricks › Help with centering menu
- This topic has 9 replies, 2 voices, and was last updated 12 years, 1 month ago by
Genesis Developer.
-
AuthorPosts
-
January 16, 2014 at 4:38 pm #85564
wp guy
MemberI've tried what I thought would work to center the menu, but it doesn't. I'd appreciate any help:
http://ashley.ethemedhosting.com/January 19, 2014 at 7:35 am #85864wp guy
MemberBump - any help with this?
January 19, 2014 at 8:16 am #85868Genesis Developer
MemberReplace in css file. line no 277
.menu-primary li, .menu-secondary li, .site-header .menu li { float: left; list-style-type: none; }with
.menu-secondary li, .site-header .menu li { float: left; list-style-type: none; }Next Add this new code
.menu-primary li{ display: inline-block; list-style-type: none; }
January 19, 2014 at 8:29 am #85869wp guy
MemberThank you, but when I put in those changes it still did not center the menu.
January 19, 2014 at 8:52 am #85874Genesis Developer
Memberare you sure that you added my code in style.css file of your child theme?
January 19, 2014 at 9:06 am #85878wp guy
MemberI'm pretty sure. I made the changes in firebug to see if it would work and it did not. Below is the entire code after I made your changes:
/* Header / Primary / Secondary Navigation
------------------------------------------------------------ */
.menu-primary,
.menu-secondary,
.site-header .menu {
background-color: #ebe5dc;
clear: both;
color: #737068;
font-size: 14px;
margin: 0 auto;
overflow: hidden;
width: 100%;
}.menu-secondary {
background-image: url(images/bg-footer-widgets-bot.png) bottom;
border-top: 1px dashed #fff;
}.site-header .menu {
float: right;
margin: 0;
width: auto;
}.menu-primary ul,
.menu-secondary ul,
.site-header .menu ul {
float: left;
width: 100%;
}.menu-secondary li, .site-header .menu li {
float: left;
list-style-type: none;
}.menu-primary li{
display: inline-block;
list-style-type: none;
}January 19, 2014 at 9:09 am #85879Genesis Developer
Member.menu-primary li, .menu-secondary li, .site-header .menu li {
float: left;
list-style-type: none;
}Still I am getting the above code. You will remove it from 277 line and add my code. It will work
January 19, 2014 at 9:13 am #85882Genesis Developer
Memberalso add this code .menu-primary{text-align: center;}
January 19, 2014 at 9:19 am #85884wp guy
MemberPerfect! That last piece of code did that trick. Thank you.
January 19, 2014 at 9:22 am #85886Genesis Developer
MemberYes. I forgot to add it first time :). We are also welcome.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.