Take a look at the following example:
<div class="container">
<div class="box1"></div>
<div class="box2"></div>
</div>
The height of box1 is smaller than that of box2. Is there a way to vertically center box1 within box2 without setting a fixed margin-top due to varying heights?
Check out the code on jsFiddle: http://jsfiddle.net/k8972/