By using only one tag and the corresponding CSS, we can achieve center alignment.
Take a look at this example: http://jsfiddle.net/EqTsu/
<style>
#test{
width: 100px;
height: 100px;
text-align: center;
border: solid 1px #ff0000;
}
</style>
<div id='test'>foo</div>
What is needed to center the content vertically in this case?
Solution:
To achieve vertical centering, you need to add the following CSS properties:
display: table-cell;
vertical-align: middle;