Russell Russell - 1 year ago 91
HTML Question

How to have a full width background image without resizing or cropping

I want to have a full width background, but when I use background-size: cover, part of it gets cut off. With background-size: contain, it repeats on the right side.
Is it possible to have the full size without cropping or resizing or repeating?
Url: http://studioavb.nl/home/

CSS:

.home-3 {
background-image: url("http://studioavb.nl/wp-content/uploads/2017/08/DSC_0896-1-2.jpg");
background-size: contain;
background-attachment: fixed;
background-repeat: no-repeat;
height: 100%;
}

Answer Source
body, html {
height: 100%;
padding-bottom: 250px;
background-image: url("http://studioavb.nl/wp-content/uploads/2017/08/DSC_0896-1-2.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download