I have seen the answer the answer to ''Vertical Align in a Div " and followed the Adam's answer. My problem is to how to have both image and text side by side and the text being at the middle of the image.
My tried code
CSS
.outerContainer {
display: table;
width: 100%; /* width of parent */
height:200px;
overflow: hidden;
border:1px solid green;
}
.outerContainer .innerContainer {
display: table-cell;
vertical-align: middle;
width: 100%;
margin: 0 auto;
}
HTML
<div class="outerContainer">
<div class="innerContainer">
<div >
<img src='http://icons.iconarchive.com/icons/danleech/simple/512/facebook-icon.png' height=50px width=50px>
<p style='display:inline-block;font-size:10px;'>Some Text</p>
</div>
</div>
</div>
My problem is to get that 'Some Text' side and at the middle of the image
**NOTE:**I know I shouldn't use inline-block here. But I don't know how to get it.