Jump to content

How do I create a background image for a specific page


Regman7
 Share

Recommended Posts

You can put a unique class name on the <body> element of each page and have one CSS rule for each one. The other alternative is to load a page-specific stylesheet on each page, each stylesheet having a different body{} rule.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the reply. I could use all of the help I can get. Here is what I am trying at the moment:

 

body {
    background: url(IMAGE LINK) no-repeat center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

body.page-id-172:before {
    background-image: url(IMAGE LINK);
}

 

The top (body { background is working fine. The body.page-id-XXX{  before IS NOT.

Link to comment
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
 Share

×
×
  • Create New...