Jump to content

Change Content Background Color For Homepage Only

Recommended Posts




I am using a masthead section on my homepage.  (I got the idea from the pagelines homepage - I love it).


sitewide I am using a light gray on the content background color, but I would like the color on the homepage to be white because the image I created for the masthead is white.  Right now the image is in a white box against the gray background.  you can see it here


Thanks for the help in advance!


Dan B.

  • Like 1

Share this post

Link to post
Share on other sites

Hi Dan B

You can change only the home page background add something like:


.home .content-pad {background-color: white;}


 .page-id-501 .content-pad {background-color: white;}


.content-pad ..... is only an example, add your code after  .home or .page-id-XXX


If you also wish to know how I find the page ID, all you need to do is load up FireBug or Google Chromes web dev tool and inspect your page html, at the top you should see body which has a number of classes assigned to it, one of these is page-id-XX (replace XX with your pages id value. I have added a screenshot to assist you.




Life is too short to remove USB safely ...

Share this post

Link to post
Share on other sites

Thanks Batman,


I use firebug before I come here for help.  sometimes I can figure it out and sometimes I'm waaay off. 


you nailed it!  I really appreciate it.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now