Error in loading images

Yeah it is but he was using it with the same format I mean
background-size: auto or cover;
You write it in that format and he used it in the same format. He only needs to use auto or cover and auto I tried doesn’t make it fit whereas cover do so I suggested cover.

1 Like

I think he didn’t, because he’s editing the code by himself. And I’m pretty sure he knows the correct format since he does have a common sense and a beginner-designer. But thank you!!

I checked code by myself using inspect element at that time. I haven’t took a screenshot but he was using in the same format as you shared.

1 Like

When you set your background size to cover, the background image takes the entire width and the entire height without stretching. This means that the image will always maintain its proportions, but will be enlarged or minimized according to the width and height adjustments. If you however change the height from 100vh to, let’s say, the height of your image, you will notice that the width also becomes perfect. However, the size of image remains same on different devices, which could create problems.

Try setting the height of the container to the height of the image and see if it works. Do send a screenshot of how this looks on your local server.

4 Likes

Unluckily, we’ve had the same problem on our website while developing it for needs of business. The problem was easily solved when we hired a new IT team, so they managed to contain the site with related images (it’s a market of European windows, so to speak)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.