Demo of the different values of the background-size property. Click the property values below to see the result:. I'm trying to get a background image of a HTML element (body, div, etc.) to stretch its entire width and height. Not having much luck. Is it even possible or do I have to do it some other way besides it being a background image? My current css is:

Background shapes Cut Out Stock Images & Pictures Alamy
Background shapes Cut Out Stock Images & Pictures Alamy
Dimples background Stock Vector Images Alamy
Dimples background Stock Vector Images Alamy
Background from Stock Vector Images Alamy
Background from Stock Vector Images Alamy
[1500+] Green Backgrounds
[1500+] Green Backgrounds
Teal Abstract Hd Wallpaper
Teal Abstract Hd Wallpaper
Garden Background Flower background images, Flower garden, Garden
Garden Background Flower background images, Flower garden, Garden
Kids background Stock Vector Images Alamy
Kids background Stock Vector Images Alamy
Videos In The Background at Alesia Lehr blog
Videos In The Background at Alesia Lehr blog
Background splats Stock Vector Images Alamy
Background splats Stock Vector Images Alamy
colorful rainbow holi paint color powder explosion isolated white wide
colorful rainbow holi paint color powder explosion isolated white wide
Template Design Background
Template Design Background
Background design mandala Black and White Stock Photos & Images
Background design mandala Black and White Stock Photos & Images
Background tiles Stock Vector Images Alamy
Background tiles Stock Vector Images Alamy
Red background display Stock Vector Images Alamy
Red background display Stock Vector Images Alamy
Photographer background Cut Out Stock Images & Pictures Alamy
Photographer background Cut Out Stock Images & Pictures Alamy
Download Bright Yellow Textured Background
Download Bright Yellow Textured Background
Multi Colors Wallpapers 1,740,924 Multi Color Background Images, Stock
Multi Colors Wallpapers 1,740,924 Multi Color Background Images, Stock
Background official Stock Vector Images Alamy
Background official Stock Vector Images Alamy
Background shimmering Stock Vector Images Alamy
Background shimmering Stock Vector Images Alamy
Background from Stock Vector Images Alamy
Background from Stock Vector Images Alamy
Background template rainbow in Black and White Stock Photos &
Background template rainbow in Black and White Stock Photos &
Geometric Background
Geometric Background
Bright background sun shining Stock Vector Images Alamy
Bright background sun shining Stock Vector Images Alamy
Background splats Stock Vector Images Alamy
Background splats Stock Vector Images Alamy
3D background Wallpaper 4K, Light, Glass, Abstract background
3D background Wallpaper 4K, Light, Glass, Abstract background
Moving background dots on Stock Vector Images Alamy
Moving background dots on Stock Vector Images Alamy
White background question done Stock Vector Images Alamy
White background question done Stock Vector Images Alamy
Blue Backgrounds Vector
Blue Backgrounds Vector
Background easter eggs in Stock Vector Images Alamy
Background easter eggs in Stock Vector Images Alamy
Background for lovers Cut Out Stock Images & Pictures Alamy
Background for lovers Cut Out Stock Images & Pictures Alamy

The background-size CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space.. This specifies the size of the background within an element. Syntax background-size: (cover/contain) _vertical_size_ _horizontal_size_; The default value is background-size: auto auto, which tells the browser to keep the original size of the image. As with other CSS properties, we can set the width and height simultaneously: background-size: auto. cover and contain The key word cover tells the.