How can I add border to a img
correctly because I'm adding the border in img
and it seems to be bigger than the others.
I'm adding by click using jquery when I click on the% frame with it with a green border of 2px as I do so it does not happen to add the border and the img
does not increase?
$('input[type=checkbox]').on('change', function () {
var total = $('input[type=checkbox]:checked').length;
$("#count").text("Fotos selecionadas: " + total);
$(this).closest('.hovereffect').toggleClass('clic');
});
.hovereffect {
width:100%;
height:100%;
float:left;
overflow:hidden;
position:relative;
margin-bottom: 25px;
text-align:center;
cursor:default;
box-shadow: 0px 0px 5px 1px rgba(0,0,0,.2);
}
.hovereffect .overlay {
width:100%;
height:100%;
position:absolute;
overflow:hidden;
top:0;
padding: 15px;
left:0;
opacity:0;
background-color:rgba(0,0,0,0.5);
-webkit-transition:all .4s ease-in-out;
transition:all .4s ease-in-out
}
.hovereffect img {
display:block;
position:relative;
-webkit-transition:all .4s linear;
transition:all .4s linear;
}
.hovereffect h2 {
/*text-transform:uppercase;*/
color:#fff;
text-align:center;
position:relative;
font-size:22px;
/*background:rgba(0,0,0,0.6);*/
-webkit-transform:translatey(-100px);
-ms-transform:translatey(-100px);
transform:translatey(-100px);
-webkit-transition:all .2s ease-in-out;
transition:all .2s ease-in-out;
padding:10px;
}
.hovereffect a.info {
text-decoration:none;
display:inline-block;
text-transform:uppercase;
color:#fff;
/*border:1px solid #fff;*/
background-color:transparent;
opacity:0;
filter:alpha(opacity=0);
-webkit-transition:all .2s ease-in-out;
transition:all .2s ease-in-out;
margin:0 0 0;
padding:7px 14px;
}
.hovereffect a.info:hover {
/*box-shadow:0 0 5px #fff;*/
}
.hovereffect:hover img {
-ms-transform:scale(1.2);
-webkit-transform:scale(1.2);
transform:scale(1.2);
}
.hovereffect:hover .overlay {
opacity:1;
filter:alpha(opacity=100);
}
.hovereffect:hover h2,.hovereffect:hover a.info {
opacity:1;
filter:alpha(opacity=100);
-ms-transform:translatey(0);
-webkit-transform:translatey(0);
transform:translatey(0);
}
.hovereffect:hover a.info {
-webkit-transition-delay:.2s;
transition-delay:.2s;
}
.col-lg-3{
width: 30%;
}
.bloco{
background-color: rgba(0,0,0,0.67);
width: 100%;
height: 100%;
opacity: 0;
position: absolute;
padding: 17px;
top: 0;
-webkit-transition: all .4s ease-out;
}
h2{
font-family: 'Courgette', cursive;
}
.corr{
background-color: #2ecc71;
width: 40px;
height: 40px;
border-radius: 30px;
position: absolute;
padding: 10px;
margin-top: -10px;
/* margin: 0 auto; */
left: 0;
/* top: 50%; */
}
.btn-group, .btn-group-vertical{
position: absolute;
top: 50px;
left: 50%;
margin-left: -43px;
}
.clic{
border: 3px solid #1abc9c;
}
#count{
font-family: 'Courgette', cursive;
}
.sweet-alert{
border-radius: 0px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script><linkhref="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
<div class="hovereffect">
<img class="img-responsive" src="http://guanambiacontece.com/wp-content/uploads/2016/01/iron-man-rep-300x200.jpg"><divclass="overlay">
<div class="pad">
<h2></h2>
<div class="btn-group" data-toggle="buttons">
<label class="check btn btn-primary">
<input type="checkbox" name="ck[]">Selecionar</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>