Black Friday 2026 50% off every plan Our biggest deal of the year on #1 Joomla products.
Ends in 12d 23h 06m 16s
Claim 50% off
Solved SP Page Builder

Background image for whole page with pagebuilder

Asked by Aldus 1 year ago Last activity 1 year ago

Hi,
I need to insert a background image for the whole page.
I try to insert in page CSS section this CSS code but it doesn't work.

.com-sppagebuilder. #sp-main-body {
background: url('/images/my_image.png');
background-repeat: no-repeat;
background-size: cover;
}

Can you help me?

Thank you

Accepted answer

Marked as the solution
Mehtaz Afsana Borsha Staff

Hi

Is this resolved now? If yes, you can then close this post by accepting the answer.

Mehtaz Afsana Borsha Staff

Thanks for accepting the answer.

22 more replies

Mehtaz Afsana Borsha Staff

Hi

Thanks for contacting us and sorry for your issue. Could you please give me your site URL? So that I can check.

-Regards.

Aldus Asked this

Please see below.

Thank you

Mehtaz Afsana Borsha Staff

But you have already a whole background image on your site.

Aldus Asked this
1 year ago · edited

yes I have but inserting same image in each section and page is very slow!!
I want one image for all page and not for each section

Mehtaz Afsana Borsha Staff

Try this CSS in your custom.css file

section#sp-main-body{
  background: url("sppagebuilder.com/addons/carousel/carousel-bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
}
Aldus Asked this
1 year ago · edited

Hello,
your css code not work.
I try with this css into my page css section:

section#sp-main-body{
  background-image: url('/images/my_image.jpg');
  background-repeat: no-repeat;
  background-size: cover;
}

but not working

Can you help me?

Paul Frankowski Senior Staff
1 year ago · edited

Ciao.

Shared above CSS looks OK.

  1. I suggest to add full domain name before /images/ with https
  2. Remember that image used on the background should be bigger than 1024px of width (!)
  3. And path and file name must exist.

Browser is not so smart, if you make even basic mistake bg image will not be displayed.


Mentioned CSS style can be used for #sp-component or #sp-main-body

Paul Frankowski Senior Staff

In first your post you made a mistake

.com-sppagebuilder. #sp-main-body { background:.....

extra "." after "....builder" yes, it can stop CSS style (!)

It must be

.com-sppagebuilder #sp-main-body {...}

Mehtaz Afsana Borsha Staff

Hi Aldus,

Is this solved now? And thanks Paul for helping him.

Aldus Asked this
1 year ago · edited

Hi,
I didn't solve anything. Your CSS doesn't work.
I need to insert the CSS in the CSS section of the affected page so that it has the same background image for the whole page.
The background image is inside the images folder.
I can't accept to insert the background image in every single section, because when it loads the page it loads it in pieces and it looks bad, especially on mobile devices.
Thanks

Aldus Asked this

I need an answer and assistance to my request. Is it possible? I pay a service to have support!
Thank you

Paul Frankowski Senior Staff

Share access to back-end otherwise we cannot check where is a mistake.

and tell me which image should be used.

Log in to reply.