different background on home page and other pages

Is there a way to have a different background color on the home page than on all other pages?

thanks, Chris

Hey Chris,

Thanks for getting in touch! That would be possible via custom CSS. But it would depend on which background you would like to change, the header, body or footer. If you could send a link to the site in question we could provide a snippet for you.

Ben

Unfortunely this site is on my localhost. I am interested in changing just the body color.
Is it possible for you to give me CSS code that would do that without seeing the site?
Where would I put this custom CSS? Into the child theme style.css via editor?

Thanks, Chris

Hey Chris,

The basic CSS snippet you’ll need would be something like the below with your color selection. However, in order to only have this apply to the homepage, you would need to also target the page ID as part of the below snippet which you can find by inspecting the page. Yes, a child theme would be ideal.

.fl-page-content {
  background: #ffffff;
}

Hope that helps!

Best,
Billy

thanks!
How do i use the Page ID in the CSS code above? Can you give me an example?

Chris

Yep, you just add the page id right before like so:

.page-id-XX .fl-page-content {
  background: #ffffff;
}

Best,
Billy

THANKS! Just what i needed.

Excellent, enjoy! :slight_smile: