- This topic has 15 replies, 4 voices, and was last updated 6 years, 10 months ago by
Leo.
-
AuthorPosts
-
July 17, 2015 at 3:38 am #121730
Joel
Hi,
I would like to reduce the size of the header and menu (above the header), basically reduce the height.
How can I achieve this?Thanks
July 17, 2015 at 3:44 am #121735Joel
I was able to figure this out, by using the spacing add-on. Thanks
July 17, 2015 at 8:36 am #121813Tom
Lead DeveloperLead DeveloperAwesome! π
January 6, 2017 at 10:48 am #261345Peter
I have the GP spacing add-on too, and I have the same question. However, I only see how to decrease header padding to “0”, not any negative padding or header height with the spacing add-on enabled.
Click on http://bob-cheryl.ptest2.com/. I would like to reduce the header height to say, 66px so that the light grey and dark grey bands are the same eight. Please advise.Also, is there any sort of “Advanced Search” incorporated into this forum? For example, exact phrase, all words, etc?
January 6, 2017 at 2:07 pm #261400Leo
StaffCustomer SupportHi Peter,
The height of your logo is 77px so that would be the minimum height of your header unless you downsize the logo.
This CSS below would make your header height as tall as the logo height no matter what size you decide to go with..inside-header p { margin-bottom: 0; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Unfortunately there is no advance search for this forum. However you can try using google, so search the topic you are looking for and add GeneratePress at the end. It’s been helpful for me that way.
Let me know.
January 6, 2017 at 3:04 pm #261411Peter
Hi Leo,
I can change how tall the logo is to suit my needs. Let’s say my logo was 100x55px, and that I wanted the header to be, say, 65 pixels tall, is there no way in the customizer to set the header height? If the answer is that there is no way to change the header height in the Customizer, then what CSS would set the header height to a specific number of Pixels?
–
Peter SaleJanuary 6, 2017 at 3:09 pm #261412Leo
StaffCustomer SupportIf your logo is 55px in height and you want the header to be 65px in height, then try the following:
– Add the code I provided above
– Head to Customizer > Layout > Header > Header Padding and add 5px to top and bottom.
Let me know if this worksJanuary 6, 2017 at 3:13 pm #261415Peter
Hi Leo,
Yes, that works. And I can easily choose whether the space is to be above and below, or just above or just below my logo. That works for me.
–
Peter SaleJanuary 6, 2017 at 3:14 pm #261416Leo
StaffCustomer SupportGlad it works π
January 24, 2017 at 5:13 pm #267886Peter
Hello Leo,
I spoke too soon. While I can successfully manipulate my site’s header height as displayed on a PC size screen, on a mobile device the mobile logo is displayed too small and with the primary navigation background. I would like my “mobile” logo to display the proper size and on the same color background as the header displays on a PC. Click on http://bob-cheryl.ptest2.com/ on a PC-sized screen to see the header display properly with its logo. Navigate to that same site on any mobile device to see the problem I’m describing.BTW, I am attempting to stay with GP settings as much as possible because doing so makes it so easy to change colors site wide while sitting with my client.
January 24, 2017 at 6:28 pm #267900Leo
StaffCustomer SupportHi Peter,
GP’s mobile header logo/navigation logo is mostly for an icon or a square-ish image.
Since you are using a simplified logo already but it’s still rectangle, can you try the following CSS and see if you like the look?#mobile-header .main-nav ul li a, #mobile-header .menu-toggle, #mobile-header .mobile-bar-items a { line-height: 60px; } .mobile-header-navigation .mobile-header-logo, .mobile-header-navigation .mobile-header-logo img { height: 50px; padding-top: 2px; }
Let me know.
January 24, 2017 at 6:40 pm #267903Peter
Hi Leo,
That CSS Code seemed to work perfectly on mobile. Check it out yourself on your smartphone at http://bob-cheryl.ptest2.com/.Just thinking out loud. Since the mobile logo I used was only 170 pixels x 55 pixels, I’m a bit surprised that I need to use “external” CSS at all. I thought the main point of using a mobile header logo was to avoid the need for custom CSS to make the logo look appropriate on a mobile device.
BTW, I’m attempting to move to using Stylizer 6 for editing CSS, so I would like to move this sort of CSS to my GP child theme’s styles.css file. Are there any problems with doing this that I should look out for?
January 24, 2017 at 6:40 pm #267904Leo
StaffCustomer SupportAs for the mobile header background color, currently it’s inherited from from the your setting in primary navigation background color. Changing it for just for mobile requires some CSS unfortuantely:
@media (max-width: 768px) { .main-navigation.mobile-header-navigation { background-color: #90c3d4; } }
Let me know.
January 24, 2017 at 6:49 pm #267906Leo
StaffCustomer SupportI’m glad you like the look π
You should be good to use a child theme as long as everything is done correctly. Some info here:
https://docs.generatepress.com/article/using-child-theme/Never hurt to back up your files when migrating things are involved though π
January 24, 2017 at 6:51 pm #267907Peter
Hi Leo,
Many thanks for the CSS. I will hold it in reserve because I think I would rather just pick a color for the navigation background that is more compatible with my client’s logo. -
AuthorPosts
- You must be logged in to reply to this topic.