Divi – transparent header only on home page

Divi – transparent header only on home page

What if you wanted a different header color JUST for the home page?

This is the snippet you’ll need.

.home #main-header, 
.home #main-header.et-fixed-header {
	background-color: transparent;
}
.home #page-container {
	padding-top: 0 !important;
}

[sc name=”customcss”]

 

Of course, you can change the colors easily by swapping out the ‘transparent’ to something else.

Cool, I’ll just sign off with just that. Maybe I should get into dissecting the header sometime.. hmm.

[sc name=”learn css”]

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. How can I push the header down to make a full bleed nav and slider style?

  2. Hi PK,

    I followed your tutorial but it pushes my hero section image into the header section.

  3. Hi, when I apply the

    .home #page-container {
    padding-top: 0 !important;
    }

    It looks as desired, but when I scrolll down there is a slight jump, and then when I scroll back to the top there is a jump again, and the white background shows for a second. Any idea what is happening there?

  4. Who needs to go look at Divi FB group when search results bring PK himself. Nice job w/SEO!

  5. Hi!

    I love the CSS and the transparent header on just the home page. But it makes the sticky nav transparent on scroll, too. Is there an addition to the CSS to retain the sticky nav customization as it is throughout the site?

  6. This is exactly what I’m looking for but I’m not 100% sure where to put that extra bit of css.

    Thanks.

New tutorials

Use a featured video in post templates with Breakdance
ACF repeater fields as accordions in Breakdance
Breakdance 2 vs. Divi 4
Breakdance 2 for Agencies

Why no ads?

Hi, I'm PK, and I maintain and publish content on this site for two reasons.

  1. To give back to the community. I learned so much from people's tutorials and StackOverflow that I wanted to contribute and help others.

  2. To provide a more structured learning experience. People struggle to find the course that guides them from start to finish, based off of real life experience, and my courses provide that.

The only "ads" I have here are for my own courses, and maybe an affiliate link, but that's it. They fund the website resources and provide more motivation for me to produce better content.

Any bit of interest helps. Even sharing with your friends, suggesting my courses to your developer or designer, or subscribing to my YT channel, or joining our Discord. Thanks and I'll see you around!

There's a newsletter!

Sign up to the newsletter for the occasional updates on courses, products, tutorials, and sales.