CSS
<style>
.wrapper:before {
/* IE6-7 inline-block support */
display: inline-block;
*display: inline;
zoom: 1;
height: 100%; /* or whatever you want */
content: "";
width: 0;
vertical-align: middle;
margin: 0 0 0 -10px; /* Makes pseudo-element disappear */
}
.wrapper:after {
clear: both; /* Release the flow ! */
}
.wrapper {
height: 300px;
border: 1px solid #ccc;
}
.element {
display: inline-block;
*display: inline;
vertical-align: middle;
zoom: 1;
/* for demo */
text-align: center;
font-weight: bold;
width: 100%;
}
</style>
HTML
<div class="wrapper">
<div class="element">Bonjour Monde !</div>
</div>