I am using bootstrap 3 for this current project and am having trouble vertically aligning some text.
Here is the HTML markup:
<div class="row overview-item">
<div class="col-sm-3">
<div class="overview-item-header">
<h3>Web design</h3>
</div>
</div>
<div class="col-sm-9">
<div class="overview-item-desc">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
</div>
Here is the CSS markup:
.overview-item{
margin-top:25px;
margin-bottom:25px;
}
.overview-item-header{
display: table;
width: 100%;
}
.overview-item-header h3{
display: table-cell;
text-align: center;
vertical-align: middle;
}
.overview-item-desc{
color:#ffffff;
background-color:#337ab7;
padding:25px;
}
Here is a screenshot of the output: https://i.stack.imgur.com/V11fx.png
The text in col 3 needs to be in the middle (vertical) with the blue box. The issue is mainly that as the window gets resized, the size of the blue box gets larger. Any suggestions on how to fix this problem will be greatly appreciated.