I have on my website divs whose width varies with the width of the window, and I'd like to have a background for these divs. When I'm in full screen (1920*1080), the background images are exactly how I want them to be :
But when I resize my window, I get this :
I used the
background-size:cover;
attribute but it does not seem to work...
CSS :
.cleft1 {
width: 33.333333%;
height: 300px;
display: inline-block;
margin-right: 0;
background-image: url('../img/aero.png');
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-ms-background-size: cover;
-o-background-size: cover;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
}