I have a problem, photo inside the DIV is not shown. Since I use the masonry grid and site is like Pinterest, I do not want to limit the height of image or inner, so I put the auto, but when I put the auto, or 100%, the image is not displayed, My code is below.
.inner {
background-color: rgb(255, 255, 255);
padding-bottom: 40px;
height:auto;
position: relative;
overflow: hidden;
border: 2px solid #ECECEC;
margin-bottom: 30px;
}
.image-box {
position:relative;
height: auto;
width: 100%;
padding-right: 0px;
padding-left: 0px;
background-position: center;
background-color: #4D4E56;
}
.image-box .img{
width: 100%;
display: block;
float: left;
background-repeat: no-repeat;
background-size: cover;
}
<div class="inner">
<a href="{{ link }}"><div class="image-box" style="background-image:url(http://placehold.it/350x550)"></div></a>
</div>