I have the following tag code with two div the bg and the lb:
.bg {
position: absolute;
background-color: red;
opacity: 0;
top: 0px;
left: 0px;
display: none;
height: 100%;
width: 100%;
}
.lb {
position: absolute;
top: 50%;
left: 50%;
display: none;
border: 30px solid #fff;
box-shadow: 2px 2px 12px #333;
background: #fff;
}
<!--bg-->
<div class="bg"></div>
<!--box de imagens-->
<div class="lb">
<img src="">
<div class="close">X</div>
</div>
please see the imagem with the issue and the goal:
So it is possible to center the two class with CSS3 and achieve the goal of the picture 2? thanks