• 0

Background Image on home page only


Question

Posted · Report post

Hi Support,

 

I am looking for a little help regarding background images. 

I have set a background image using the Color & BG Global Settings and all looks fine on the landing page. 

 

However, i want to have a background image on the home page only. Currently it is applied to every new page i create. 

 

I assume it is to do with the Global Settings so i wonder what is the best way to apply the background image to the home page only. 

 

Thanks in advance for your help. 

 

Sean. 

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Posted · Report post

Hi Danny,

 

Got it working by adding .site-wrap after .home

Thanks again for the help always great service from the DMS staff. 

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

To display a background image on your homepage only you will need to use custom CSS. You will need to prefix your CSS with the home class which is in the body tag.

 

Something like this:

 

body.home { ... }

 

And don't use the option to upload a background image.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Danny

 

Thanks for that but if i use the code: 

 

body.home{
background-position: 50% 0;
}
 
The background image is still displaying site wide. I have got around it by adding the following to the other pages:
 
.page-id-10 .site-wrap {
background-image: none;
}

 

It works but isn't really ideal, am i missing something from your original suggestion? 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Do you have a link to the site in question please. As there should be no need for the other CSS to hide it from other pages.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Danny

 

Only on local host at the moment.

ill upload to live server shortly and if the problem persists ill send you over the link. 

 

Thanks for your help. Ill keep you updated. 

 

Sean. 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

oK cool.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Glad you got resolved, thanks for updating the thread and letting us know.

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