Archived topic
Add background image only to one page
3 replies · Started by Francesco on February 6, 2019
Hi,
I need to create a landing page and I want to add a background image.
How can I do?
I'm using gp premium
Hi there,
needs a little CSS - if is the home page then:
.home {
background-image: url('full_url_to_image/image.jpg');
background-size: cover;
}
If another page then you would replace .home with the .page-id-xxxx
Thanks.
Any chance to have this added as option on elements in future?
We haven't seen a huge demand for adding dynamic backgrounds ie. lots of different images being used across multiple pages or templates. But we're always looking for feedback for improvement so i can add to the list for us to look into. Thanks for the suggestion.
The CSS can be added using a hook using the body class e.g.
<style type="text/css">
body {
background-image: url('full_url_to_image/image.jpg');
background-size: cover;
}
</style>