/ Published in: CSS
URL: http://designshack.co.uk/articles/css/html5-and-css3-snippets-every-web-developer-show-know/
It’s a pretty simple task to horizontally center any part of your web page. This practice has gone on for years, and CSS has made things much easier. However vertical alignments have always caused problems for web developers. Except with the code below it’s a peice of cake! The vertical-align attribute will work wonders and doesn’t require any extra code for perfect vertical alignment.
Expand |
Embed | Plain Text
.vcontainer { min-height: 10em; display: table-cell; vertical-align: middle; }
You need to login to post a comment.
