Created
October 25, 2012 00:07
-
-
Save incompl/3949732 to your computer and use it in GitHub Desktop.
flexbox.incompl.com
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> | |
<html> | |
<head> | |
<title>vertical centering 4 lyfe</title> | |
<link href='http://fonts.googleapis.com/css?family=Handlee' rel='stylesheet' type='text/css'> | |
<style> | |
html { | |
height: 100%; | |
} | |
body { | |
font-family: sans-serif; | |
color: #D4A9D2; | |
height: 100%; | |
margin: 0; | |
display: -webkit-flex; | |
display: flex; | |
background-color: black; | |
} | |
.centered { | |
margin: auto; | |
max-width: 380px; | |
} | |
h1 { | |
color: white; | |
font-family: Handlee, sans-serif; | |
font-size: 2em; | |
text-shadow: 1px 1px 0 Fuchsia; | |
} | |
a:link, a:visited, a:active { | |
color: #D9D9D9; | |
} | |
a:hover { | |
color: Fuchsia; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="centered"> | |
<h1> | |
flexbox makes it easy to do vertical centering in css!!!! | |
</h1> | |
<p> | |
only works in chrome now, <a href="http://css-tricks.com/old-flexbox-and-new-flexbox/">here's why</a> | |
</p> | |
<p> | |
<a href="http://www.w3.org/TR/css3-flexbox/">read the spec</a> | |
</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment