Background image question

Hello!

I am a new X theme user and I would like to use an image on the background of my website. What should I resize the image too? Every time I upload the image, It blows it up and it becomes very blurry. It is a stock image I purchased from Adobe Stock.

Hello @enixon627,

Thanks for asking. :slight_smile:

Ideally you can try 1440px or 1600px width and the height depending on the requirement.

Thanks.

Is there anyway someone can look at the website and try to help me? I have tried resizing the image and it keeps doing the same thing.

Hello There,

Thanks for writing in! Background images will try to cover that whole section. With Background image you can hardly achieve a total responsiveness without compromises. I would like you to try this demo here: https://davidwalsh.name/demo/background-size.html which would explain how background image works.

In Cornerstone, we use the background-image: cover; which would cover the whole area of the container. This is responsive enough which will always covers the whole area. The only thing to consider here is that if your image size is smaller, it will be stretch out and if you have a bigger image, it will get cut off.

Yes we can use background-size: 100% 100%; which is also responsive but your image will either be stretch out or get squeezed depending on the size of the container.

Yes we can also use background-size: 100% auto but then as soon as you resize your browser or on smaller screen sizes, you will probably have white spaces around the image.

Or we can also use background-size: contain; but then this is not a good choice because you will see white spaces around your image.

Hope this helps.

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