Jump to content

Archived

This topic is now archived and is closed to further replies.

seanocaside21

Background Image on home page only

Recommended Posts

seanocaside21+    10
seanocaside21

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
Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
seanocaside21+    10
seanocaside21

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
Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
seanocaside21+    10
seanocaside21

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
Danny    1,327
Danny

oK cool.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
seanocaside21+    10
seanocaside21

Hi Danny,

 

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

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

  • Like 1

Share this post


Link to post
Share on other sites
James B    436
James B

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


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

  • Similar Content

    • SaschaM
      By SaschaM+
      Hello,
      sorry. i got a problem on my site i can not fix myself, would be nice somebody can help.
      I use:
      - Platform 5 (latest) Pro
      - Pagelines Framework (latest for Platform 5)
      - keycdn (cdn enabler, cache enabler und optimus WebP)
      - my site:  example
      Problem:
      The background image i use in the Impulse Section is not beeing replaced automatically if i specify a CDN Url. I need to put in the cdn url to the image manually. Why?
      If you look in the button of the the side you see post grid section, where i have no problems. You also see there WebP Images working.
      Now i can not really use the direct cdn url for the impulse background image, cause i want to benefit there from WebP Image also in the background as it works in post grid section.
      How does it works with Impulse? The webP image for the background is ready to use.
      Thank you.
       
       
       
       
       
       
       
       
    • crose
      By crose+
      Hi,
      I am using the Canvas Area section at the top of my site. I have a video playing in the background, which works really well on desktop. But on mobile video doesn't play without user interaction, so I have a static image in place as an alternate image. However when viewed on a mobile device there is now a play button over the static image that does nothing. This didn't use to happen so I imaging it is due to an upgrade. But this is really bad UX. Is there a way to remove it?
      Here is the site:
      http://gator4088.hostgator.com/~asif/
      Thanks in advance.
      Chuck
    • jeomiland
      By jeomiland+
      Hi
      Have a couple clients who are having background image issues. This should be a basic question so hope fix is easy. How do you get a specified image to auto resize so it fills the browser screen? Client has portrait-format image that's 1000x1000 and the left and right are displaying the background color (white) on my 1440 wide Macbook pro, as it is on client's computer. She has tried clicking "Fit image to page" and repeat background - neither is getting what she expects.  I suggested trying a landscape-format image.
      But the larger question is this - how does one plan a proper background image that will fill the whole screen - left to right - in the browser image and have it scale appropriately?  Should one always have landscape background images? What about scrolling vs not scrolling BG? How plan your BG image so it will fill the screen on laptops, ipads, iphones...  both in landscape and portrait format? Is it true that you can't do it? that either the left-right or top-bottom are cut off depending on the device and orientation?
      2 sites where this needs resolution:
      http://cassclayton.com/dev/
      http://chirecovery.com/
      Thanks!
      JE
    • hibbsy78
      By hibbsy78+
      Mobile layout much better in 5.0.3. There appears to be an issue that it 'super-sizes' the background image?
      http://www.johnhibbs.me


    • dawsonbarber
      By dawsonbarber+
      Under PageLines > Settings, it looks like the actual setting for the background image tile size is missing.
×