

I had issues with webkit, background-size:cover and SVG background images. That is because the image has to be stretched to fill the height of the screen size not the container for the parallax area. 30 Have you tried background-size:cover Check some examples. Notice here how zoomed in the image has to be. Notice how you see all of the image because the ratio matches that of the container. Let’s say I used this image:īelow are two examples, one with the background set to cover and one with the background set to parallax. Here is an example that will hopefully clarify.

So it doesn’t matter how tall your container is that you want to have a parallax background with. But parallax has to fill the entire height of the screen because it’s set to be fixed behind your content. So if your container is 400px high then that’s as tall as the image needs to be. I want to briefly explain how parallax is different from “background-size: cover”.īackground cover only has to fill the space of the container. The background options for this can be found in your page-builder row styles. Check out the “want to see more” section of this demo. One of the fun features in our premium themes is the ability to add parallax backgrounds. I hope that helps to explain background sizing options. So the image will stretch or distort to fill the space while showing the complete image. This 100% 100% option will not protect the ratio of your image.
#Background image stretch to fill full
This contain option will respect the ratio of your image and make sure none of the image is off screen so you will always see the full image in the correct ratio. Meaning you will have parts of the image that are off the screen and not seen. It does this while respecting your image ratio so it will stretch the image always to fill, but will not distort it out of the image ratio. This option will make sure there are no empty spaces in the container that are not filled with the background image. In the images below we’ve outlined two screen sizes, one that is a desktop and one that is mobile to show how each size setting works. Meaning for every 2px it is wide, it’s 1px tall. Let’s start with an example using an image that is a 2×1 ratio. What you can determine with a background is how that image fills the space of the container. The size of whatever you’re adding this background image to will be determined by the content that is within the container. Now a background image is just that it’s a background so you cannot set the size of an area by adding a certain size background image. Here is a quick tutorial outlining the important things to grasp when setting up your background. It is possible to set the CSS background-size property to cover. When you are setting up your site and you want to place an image behind some content or to cover a whole area it is import to understand a few key options in terms of background size. Fill the Entire Viewport with the background-size Property.
