use image as background

Posted in: Newspaper
Post count: 50

Hello, I am building a new page using visual composer. It is not a post, but a page.

Can I use an image as a background for this page?

Thanks 🙂

Post count: 22421

Hello,

You can set a general image background from the theme panel: http://screencast.com/t/n50aBj8V
This will apply to the entire website: category pages, posts and pages. You can set a background image to a category as well: http://screencast.com/t/4kmyRMiBv
If you want to target just a page you will have to use css to do it.
First you will need to set a background color from the theme panel. Any color will do even white counts just change from the default which is an empty box: http://screencast.com/t/PzP3XZci
The you can use this code:
.page-id-754 {
background-image: url("enter image url here");
}

You can target your page id using your browser inspector. Every page has a different ID. Mine was 754. Yours will be different: http://screencast.com/t/7VqDZLTjXcr
The background will need a few adjustments to be positioned properly though.

I hope this helps.
Thank you!

Post count: 50

Hi, thanks for your answer, where shall I use this code?

In your custom CSS panel will do?

Thanks 🙂

Post count: 22421

Hi,
Yes. The theme panel-custom -> css box. Sorry for not specifying earlier.
Keep in mind that it depends on the size of the image you set, it will not be positioned well. It needs a few adjustments maybe like:
background-size: Xpx Xpx; or background-repeat: no-repeat;
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.