there is this background-image i have in my div element and I want it to "fill" upwards/downwards and cover its entire height and width. Please explain me how this is possible with CSS. Any help is greatly appreciated.Thanks in advance.
The background-repeat property in CSS is used to repeat the background image both horizontally and vertically. It also decides whether the background-image will be repeated or not. Background-repeat: This property is used to repeat the background image both horizontally and vertically.
The background-repeat property sets if/how a background image will be repeated. By default, a background-image is repeated both vertically and horizontally. Tip: The background image is placed according to the background-position property.
If you want the background image not to repeat at all, use background-repeat: no-repeat; .
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
Documentation from CSS Tricks: http://css-tricks.com/perfect-full-page-background-image/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With