- This topic has 9 replies, 3 voices, and was last updated 7 years, 8 months ago by Tom.
-
AuthorPosts
-
July 29, 2016 at 12:49 pm #213967NBC
I’ve looked through the files for GP/GP Premium and through the forums, but can’t find an answer to this question.
How do I control the left margin applied to the main menu? My logo, tagline, and content all fall farther to the right than the first item of menu text. I want them all to follow the same left margin.
Thanks for the assistance!
July 29, 2016 at 2:33 pm #213973LeoStaffCustomer SupportHi there,
Try the CSS below and adjust the px number as needed:
.main-navigation { margin-left: 40px; }
Adding CSS: https://generatepress.com/knowledgebase/adding-css/
If this doesn’t work can you provide a link to your site?
July 29, 2016 at 4:09 pm #214000NBCThanks for the code. I loaded it through Tom’s Simple CSS plugin.
Unfortunately, that setting shortens the menu bar rather than simply increasing the left margin of the type. All I want to do is move the type for the menu items so the leftmost lines up with the logo, tagline, images, and body copy. The menu bar should stay the full screen width.
I’m developing this redesign under localhost, so I can’t provide a link. Sorry!
July 29, 2016 at 4:54 pm #214006LeoStaffCustomer Supportso currently you have
Header Alignment > Left,
Navigation Position > Below Header
Navigation Alignment > Left,
and everything is not aligned to the left? Any chance of a screen shot?July 29, 2016 at 5:40 pm #214008LeoStaffCustomer Supportactually give this CSS a shot:
.main-navigation .main-nav ul .current-menu-item:first-child > a { margin-left: 40px; }
let me know if this is what you are after π
July 29, 2016 at 6:08 pm #214031TomLead DeveloperLead DeveloperIf the above doesn’t do it, a screenshot of the area would definitely help π
July 30, 2016 at 3:52 am #214079NBCI was hoping to avoid the hassle of finding somewhere to upload an image file, but here it is.
From left to right, this image shows the default behavior of the menu, the effects of the first piece of code, the effects of the second piece of code, and the desired appearance of the menu.
Everything is left aligned, with navigation below header. I have blurred out some details that I need to keep private at this time.
July 30, 2016 at 8:54 am #214123TomLead DeveloperLead DeveloperI think the only way to achieve what you’re looking to do is this CSS:
.main-navigation .main-nav > ul > li:first-child > a { padding-left: 40px; }
However, wouldn’t it be easier to just remove the left padding from the header?
July 30, 2016 at 9:19 am #214124NBCTom, that’s it! Perfect! Thank you ever so much!
And to answer your question: It’s not just the header that has that 40-pixel padding. The same padding/left margin appears on the post content as well. Without the code you gave me, the menu’s the only thing that doesn’t start 40 pixels from the edge of the screen.
July 30, 2016 at 9:30 am #214125TomLead DeveloperLead DeveloperAwesome, glad I could help π
-
AuthorPosts
- You must be logged in to reply to this topic.