Background image not loading correctly in html

Viewed 40

I'm using the same code for a background image for my site and it's not supposed to have any repeats - and I added the background-repeat: no-repeat; line in the style section of my pages (I only have 3).

The code for the background image is the same for all three pages, though one of them doesn't load the image.

Another problem is that in my default browser (Opera GX) the background image repeats, but when I open the page in Firefox and Edge the pages load correctly, except for the one mentioned above.

This is the code I'm using for the background image on all 3 pages:

body {
  background-image: url('photo_2022-07-10_18_45-38.jpg');
  background-size: 1920px 920px;
  background-position: contain;
  background-repeat: no-repeat;
}

Can someone explain anything wrong in the code above and why it's causing the issue described?

1 Answers

Maybe you need to check which version of the opera browser you are using is it supported for css. Here I attach a link to find out the versions of some supported browsers : background-repeat

Related