- This topic has 11 replies, 3 voices, and was last updated 3 years, 11 months ago by
David.
-
AuthorPosts
-
April 12, 2019 at 8:21 pm #867623
Leif
In this image you can see that when I align my primary nav ‘float right’ of my header it isn’t vertically centered vs the site logo image and it has these horizontal bars that come with it?
How do I vertically center it and get rid of the bars?
GeneratePress 2.2.2GP Premium 1.7.8April 13, 2019 at 5:01 am #867814David
StaffCustomer SupportHi there,
try this CSS:
@media (min-width: 768px) { .inside-header { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .site-logo { margin-right: auto; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 13, 2019 at 8:35 am #868017Leif
OK neat thanks David. Its centered now but is there also a way to get rid of the lines around the primary navigation?
See image
April 13, 2019 at 11:33 am #868070Leo
StaffCustomer SupportRemove this CSS from Additional CSS in the customizer:
/* navigation top and bottom rules */ #site-navigation { border-top: solid 1px rgba(136,136,136,0.5); border-bottom: solid 1px rgba(136,136,136,0.5); }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 14, 2019 at 3:29 pm #868888Leif
Right on thanks!
But now I realize I need the equivalent rule on top of my hero image ๐ since the rule isnt coming from the navigation anymore (and I’m moving the navigation)Sorry this was more complicated than I planned. T_T
April 14, 2019 at 5:24 pm #868920Leo
StaffCustomer SupportCan you link me to the page in question?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 14, 2019 at 7:47 pm #868968Leif
Sure its this page (im testing out an updated home page here)
the primary nav is under the header here because I dont know how to change it for just this trial page.
but there are rules above and below it which i will remove when I float the primary nav to the right of the site logo. So I want to put a rule on the top of the hero image once I move the nav.April 14, 2019 at 8:13 pm #868980Leo
StaffCustomer SupportYou should be able to do this:
.page-hero { border-top: solid 1px rgba(136,136,136,0.5); }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 17, 2019 at 4:50 am #871355Leif
Oh nice it works but I realized there is a problem
Not all of my pages have the hero image but when I move my primary navigation I will lose the rule it gives at the bottom of my header.How would I put the same rule at the bottom of the header? I assume its like this but I cant figure out how to address the header ๐
.header { border-bottom: solid 1px rgba(136,136,136,0.5); }
April 17, 2019 at 8:06 am #871669David
StaffCustomer SupportHi there,
you already have borders on the top and bottom of the primary nav? So i am unsure as to what is missing when you visit a page without a Header Element
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 17, 2019 at 8:30 am #871688Leif
Sorry I plan to move the primary nav to float right of the logo, thus causing me to lose my borders, but I don’t want to move it until I can figure out how to put the rules in.
April 17, 2019 at 8:47 am #871712David
StaffCustomer SupportAah ok. You would need to use the
.site-header
selector in your CSSDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.