Background image for home page only?


#1

I have a need to put an image in the background of only the home page. The color I have is no longer suitable for a new slider I have added. I’m hoping it’s just some CSS, but I have been using Code Snippets of late so if there is PHP to do it, I would be happy with that.

Thanks in advance for your guidance!


#3

Hello,

I would be glad to help you, but can you please provide a link to your website?

Kind Regards, Roman.


#4

Hi Roman,

It is https://test.yourideacounts.com/.

Rob->


#5

Hello Rob, thank you for the link.

  1. Can you please also provide a link to the image that you would like to use as background there?

  2. Please create a new topic for your second issue to keep forum in good order and make it easier to help you.

Kind Regards, Roman.


#6

Hi Roman,

Sorry, I deleted the 2nd question and created a new topic for it.

The link to the image is:

Also adding here as an attachment in case you can’t get to it:

Thank you in advance for your help!

Rob->


#7

Hello Rob, try to use the following CSS code.

You can add CSS code in Customize → Additional CSS section.

body.home #content {
    background-image: url(https://forums.athemes.com/uploads/db8325/original/2X/3/3ce337093ac8acaf8f597a7fb1863204e8a76bec.jpeg);
    background-size: cover;
}

But you might want to use a link from your site Media Library.

Kind Regards, Roman.


#8

Hi Roman,

This is a FANTASTIC SOLUTION - you are my hero!!!

Notice how the opacity of the image and thumbnail (attached here) make this an even better solution than I had hoped for. It makes everything blend together so well!!! Because the image in the slider is also clouds, I lose nothing and gain everything!!!

I can’t thank you enough!!!

Rob->


#9

Great! You are welcome Rob :slight_smile:

Kind Regards, Roman.


#10