Change header color for Posts

Hi,
I have a transparent header background for my home page in order for the cover picture to stand out.

When I clicked on the “Blog” page, I have managed to use code to change the color for that page to a black background.

My problem is: I am struggling to change the background for the Posts headers to black as well.

Any suggestions on how to change this?

Thanks

Hello,

Can you please provide a link to your website and describe what you want to achieve more precisely?

Kind Regards, Roman.

Hi Roman,

The website is not live yet. This is running on the dev environment (on WAMP) with the latest Wordpress.

It is the masthead that is not changing colour to black on the “Posts” (hence why you can see that the logo and menu “disappears” in the image in my previous message).

The hompage looks like this:

But I need to have the mastheads of each “Post” in the Blog to have a black background, instead of the “transparent” or “white” background" that it currently has.

Does this make sense?

And just to quickly add, I have tried to change the background color in the Additional CSS section for the page ID for each of the posts I want changed, but it is not working. Here’s the code that I have used:

.page-id-1 #masthead {
background-color: #000000;
}

Hello,

I don’t think that I can provide much help here without a link, unfortunately.

Kind Regards, Roman.

Hi Roman,

I will upload to a live server shortly, and will let you know when it is live so that you can take a look.

Thanking you in advance!

1 Like

any updates here, I’m having this exact problem

Try using this code for the blog posts:

.blog #masthead {
	background-color: #000000;
}

And then for every new page that you create, use the following code and add that specific page id in the place of the current page ID:

.page-id-63 #masthead {
background-color: #000;
}