Return to Snippet

Revision: 43862
at April 1, 2011 13:21 by dubogii


Initial Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Flexible height vertical centering with CSS, beyond IE7</title>

<style>
html,
body {
    width:100%;
    height:100%;
}
html {display:table;}
body {
    display:table-cell;
    vertical-align:middle;
}
#body {
    max-width:50em;
    margin:0 auto;
	border: 1px solid #000;
}
</style>

</head>

<body>
    <div id="body">
        Content goes here
    </div>
</body>

</html>

Initial URL
http://www.456bereastreet.com/archive/201103/flexible_height_vertical_centering_with_css_beyond_ie7/

Initial Description

                                

Initial Title
Flexible height vertical centering with CSS, beyond IE7

Initial Tags
css

Initial Language
CSS