Site logo

Archived topic

changing navigation background color with merged header

12 replies · Started by Susanne on June 1, 2017

Viewing posts 1–13 of 13

Hi there,
I have made a child theme and am using a merged header on the home page, but I cannot figure out how to make the background color of the main navigation semi transparent. I keep seeing inline styles that specify a color of #222222 for the navigation background color in line 20 of the inline styles sheet.
I am trying to apply

.home .main-navigation{
    background: rgba(0,0,0,0,0.4);
}

I have use GP for several projects and never come across this issue. It must be the header. Please help. Thanks

Hi there,

Have you tried changing it in Customizer > Colors > Primary Navigation > Background?

Can you provide a link to your site if this doesn't work? Thanks!

Let me know.

Hi Leo, You are fast :)
If I change the color in the customizer I still cannot override it in my stylesheet. Thats why I think it must have something to do with the header/merged header option.
I am developing locally right now, so can't show you.
Any other ideas?

Sorry why would you need to override it if you can just use the customizer option?

I'm assuming your CSS is just getting overwritten right now but hard to tell without seeing the live site.

because I want a semi-transparent color on the homepage over the image in my header. In the rest of the site it can be the default color. I will try to make it live soon

Ahh I see. Could try adding !important:

.home .main-navigation{
    background: rgba(0,0,0,0,0.4) !important;
}

nope that doesn't work either. I will post the site on my server and let you know whn its up

Your CSS has an extra "0" in it. Each number in the array stands for the parts of RGBA (red, green, blue, alpha) so there should be 4 numbers, but you have 5.

Update it to this:

.home .main-navigation{
    background: rgba(0,0,0,0.4) !important;
}

Ahh it's invalid value.

Try something like this: background: rgba(0,0,0,0.4);

Thanks wekhter :)

Thank you both! I had a feeling it was something like that. ok all better now. You guys rock. I hope I din't waste your time

You're welcome :) Absolutely not!

This archived topic is closed to new replies.