Vertical centring of several divs inside another
HTML
<div style="width:800px;" class="thebowl">
<div class="thefloater">
<div class="innerbox">
<a href="#" class="services"><img src="http://s24.postimg.org/3t7bg1qgh/Scissors.png"/></a>
</div>
</div>
</div>
CSS
.thebowl {
text-align: center;
background: #eee;
border: #a0a0a0 solid 1px;
margin: 5px;
}
.thebowl:before {
content: '';
display: inline-block;
height: 100%;
min-height: 800px;
vertical-align: middle;
}
.thefloater {
display: inline-block;
vertical-align: middle;
width: 30%;
padding: 10px 15px;
border: #a0a0a0 solid 1px;
background-color: #ccc;
}
.innerbox{
position: relative;
width: 100%; /* desired width */
display: block;
padding-top: 100%;
}
a.services{
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
text-align:center;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
border:20px solid #e5f2f7;
border-radius:100%;
text-align:center;
display:inline-block;
}
a.services:hover{
border:40px solid #7ed4f7;
}
a.services img{
margin:32% 0;
}
a.services:hover img{
margin:30% 0;
}