In my tutorial requests Trello board, a user asked:
Infinity Pro Once you add a logo the header background on the Home screen becomes white. Would LOVE help going back to see thru ‘with’ logo.
When a site header image has been set in Infinity Pro, the site header on the front page will no longer be transparent in its initial state.
Want to change this so the header remains transparent with a site header in place?
Simply edit css/style-front.css
and make these changes:
.front-page .white .site-header,
.header-image.front-page .site-header {
background-color: #fff;
border-bottom: 1px solid #eee;
}
to
.front-page .white .site-header,
.header-image.front-page .white .site-header {
background-color: #fff;
border-bottom: 1px solid #eee;
}
and
.front-page .genesis-nav-menu .sub-menu a,
.front-page .white .genesis-nav-menu a,
.front-page .white .offscreen-content-icon button,
.front-page .white .site-title a,
.header-image.front-page .genesis-nav-menu a,
.header-image.front-page .genesis-nav-menu .sub-menu a,
.header-image.front-page .offscreen-content-icon button {
color: #000;
}
to
.front-page .genesis-nav-menu .sub-menu a,
.front-page .white .genesis-nav-menu a,
.front-page .white .offscreen-content-icon button,
.front-page .white .site-title a,
.header-image.front-page .white .genesis-nav-menu a,
.header-image.front-page .white .genesis-nav-menu .sub-menu a,
.header-image.front-page .white .offscreen-content-icon button {
color: #000;
}
When scrolling down, the header will get a white background.
Thank you very much, this is much more concise!
Thanks! Very easy. The weird thing is that once you upload a logo the navigation isn’t centered anymore. Is there a way to fix this?
Yes.
Add this in
style.css
:Thank you, that was also bothering me!
Hi Sridhar, I appreciate all that you do for us! This seems to center the nav between the right edge of the header image and the right edge of the page. But how would I be able to center the nav perfectly in the center of the page (disregarding the header image)?
Any help would be incredibly appreciated!
This was very easy to implement.
I have a question regarding pages, however.
On the homepage the site header is transparent and gets a white background as you scroll down.
I was wondering how to implement this site header feature on all pages (not just the home page site header). This way the site header will show the background image I’ve selected for each page.
In
style.css
try changingto
I did this and it does make the header transparent. But when I combine it with your other tutorial on how to get a header image on each page (https://sridharkatakam.com/featured-image-header-static-pages-infinity-pro/) it does not work. How can we get it working to have a transparent header with a featured image on every page? Thanks!
Alternatively, with above CSS implemented it will have a white logo at first on every page. How do I change it so that this white-to-black change only happens on the front page, and every other page just has a black logo?
Do you know a way to have the header image change on scroll from a light color (over a dark background image) to a dark color against the white background of the sticky nav bar?
Thanks!
It would be interesting for me too.
Yes.
Set the light version of the image at Appearance > Header in the Customizer.
Upload the dark version to theme’s images directory.
Then add this in style.css:
where dark-text-logo.png is the name of the dark image.
It does not work for me. The logo is still seen with the white background.
from
.front-page .white .site-header,
.header-image.front-page .site-header {
background-color: #fff;
border-bottom: 1px solid #eee;
}
to
.front-page .white .site-header,
.header-image.front-page .white .site-header {
background-color: #fff;
border-bottom: 1px solid #eee;
}
and from
.front-page .genesis-nav-menu .sub-menu a,
.front-page .white .genesis-nav-menu a,
.front-page .white .offscreen-content-icon button,
.front-page .white .site-title a,
.header-image.front-page .genesis-nav-menu a,
.header-image.front-page .genesis-nav-menu .sub-menu a,
.header-image.front-page .offscreen-content-icon button {
color: #000;
}
to
.front-page .genesis-nav-menu .sub-menu a,
.front-page .white .genesis-nav-menu a,
.front-page .white .offscreen-content-icon button,
.front-page .white .site-title a,
.header-image.front-page .white .genesis-nav-menu a,
.header-image.front-page .white .genesis-nav-menu .sub-menu a,
.header-image.front-page .white .offscreen-content-icon button {
color: #000;
}
in style-front.css
What I´m doing wrong?
I’m having the same issue. I’m guessing something has been changed from the original post. Both of those CSS blocks are identical – thereby changing nothing. Did you ever find a solution?
Thanks
Jim
That’s what i’m looking for. Thanks for the help! 🙂
Scratching my head…. Those 2 CSS blocks look identical…. What did I miss?
Thanks
Jim