Skip to content

Instantly share code, notes, and snippets.

@fawkeswei
Last active December 15, 2015 05:39
Show Gist options
  • Save fawkeswei/5210506 to your computer and use it in GitHub Desktop.
Save fawkeswei/5210506 to your computer and use it in GitHub Desktop.
align center test
<!DOCTYPE html>
<style type="text/css">
.container {
position: absolute;
width: 100%;
height: 100%;
background-color: green;
}
.title {
position: relative;
width: 200px;
height: 200px;
margin: -100px 0 0 -100px;
left: 50%;
top: 50%;
background-color: blue;
}
</style>
<div class="container">
<div class="title">This is some header</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment