Skip to content

Instantly share code, notes, and snippets.

@colbyr
Created April 2, 2012 03:12
Show Gist options
  • Save colbyr/2280250 to your computer and use it in GitHub Desktop.
Save colbyr/2280250 to your computer and use it in GitHub Desktop.
HTML Centered Block
.centered {
width: 300px;
margin-left: auto;
margin-right: auto;
}
<div class="centered">
<h1>Centered</h1>
<p>This block is centered</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment