Created
February 5, 2013 21:20
-
-
Save joseadrian/4717759 to your computer and use it in GitHub Desktop.
Cross browser vertical aligment. From: http://csscreator.com/node/20471
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<html> | |
<head> | |
<link rel="stylesheet" href="style.css" type="text/css" media="screen" /> | |
<style type="text/css" media="screen"> | |
#container{ height: auto; min-height: 100%; } | |
</style> | |
</head> | |
<body> | |
<div id="container"> | |
<div id="wrapper"> | |
<p>Not much going on here!</p> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, | |
body | |
{ | |
height: 100%; | |
} | |
#container | |
{ | |
position: relative; /*** Let's be nice to IE ***/ | |
width: 200px; /*** Content Width ***/ | |
margin: 0 auto; | |
display: table; /*** For non-IE browsers ***/ | |
height: 100%; | |
background: #FFCCCC; /*** Background color of content section ***/ | |
} | |
#wrapper | |
{ | |
display: table-cell; /*** For non-IE browsers ***/ | |
position: relative; /*** Let's be nice to IE ***/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment