img {
background-image: url(../img/slides/11.jpg);
max-width:100%;
height:auto;
}
When I put the above code, the following error occurs:
Theimage(asinthephoto)goesup.
Beingwithoutthecodelookslikethis:
WhatcanIdo?
html:
<divclass="bg-img bg-img-1"></div>
css:
#home .bg-img {
padding: 100px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
position: absolute;
top: -50px;
left: -50px;
width: 100%;
height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
background-position: center center;
}
#home .bg-img-1 {
background-image: url(../img/slides/11.jpg);}