Fantxa
June 10, 2021, 5:10am
1
I have added a background image, however, it is applying to all pages. I just want it to apply for a single page - The about-us page.
This is the code I added to my Debut theme for the background image under theme.css:
#PageContainer {
background-image: url(“Goku4.png”);
background-size: cover;
background-repeat: no-repeat;
background-position: 10px -270px;
}
I tried to use the background class code and also the following code in my theme.liquid section but it does not work:
<body class="..... {% if page.handle == 'about' %}background-class{% endif %} ">
Any help is appreciated.
Hello @Fantxa
Please try the below code.
.background-class {
background-image: url("Goku4.png");
background-size: cover;
background-repeat: no-repeat;
background-position: 10px -270px;
}
.
Fantxa
June 10, 2021, 5:24am
3
I tried adding that instead of #PageContainer but it did not work. See image below.
Sorry, My bad
Please go to Layout → theme.liquid and place this code between
Fantxa
June 10, 2021, 5:42am
5
Isn’t the code you’re giving me is just for the background image? I already got that. I just need the background image to be on 1 page instead of all pages. Also, the code you provided did not work. The one I originally used is the only one that works.