Raul Raul - 1 month ago 4
CSS Question

Not able to get image inside div

Overflow:hidden did the job but now I have one more issue:

when I reduce browser size say mobile size I see gap between second and third div
here is link to codepen http://codepen.io/rahulv/pen/PGLBdY

css:

. div.outer_certi{
margin-top:2%;
height: 100%;
}
.certification p{
padding:1% 1% 1% 1%;
}
.certification img{
padding:1% 1% 1% 1%;
float: left;
max-width:200px;
height:auto;
}
.certification{
border:1px solid #e6e6e6;
background-color:#faf9f;
overflow:hidden;
}
.certification:hover{
-moz-box-shadow: 0 0 10px #ccc;
-webkit-box-shadow: 0 0 10px #ccc;
box-shadow: 0 0 10px black;
}

Answer

in your .certification class add overflow:hidden;

the gap comes from your div.outer_certi selector. remove margin from that rule.

Comments