Awaiting an answer Templates

Background image not loading

Asked by Thomas 4 years ago Last activity 4 years ago

Dear Sir

I am using J4, SPPage builder and current helix untimate template

I have used the following code in the Custom CSS section of the template
body {
background-image: url("images/nithbybfhs_background.jpg"); / The image used /
background-color: #cccccc; / Used before image would be loaded /
background-position: center; / Center the image /
background-repeat: no-repeat; / Do not repeat the image /
background-size: cover; / Resize the background image to cover the entire container /
}

The issue is the background images is not loading in other pages outer than the home page.

https://nithybfhs.com/alpha/index.php/mission

Will you please suggest a solution please

Thanks

Thomas

3 replies

Pavel
4 years ago · edited

Hi.

First thing - path to your image is not right.

Second thing - / before is required.

 body {
    background-image: url("/alpha/images/nithbybfhs_background.jpg");
}

If in the future you are going to transfer this site to some kind of domain, then you will need to change this path to url("/images/nithbybfhs_background.jpg").

Therefore, a bad idea to develop a site in the folder. Better use sub domain for development.

Anne Staff

Hello Thomas,

Thanks for contacting us. You can follow pavel's instruction.

And @Pavel , Thanks for the solution.

-Regards

Thomas Asked this

Thanks for your support, it worked

Log in to reply.