Skip to content

Instantly share code, notes, and snippets.

@afraser
Created January 18, 2012 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afraser/1634534 to your computer and use it in GitHub Desktop.
Save afraser/1634534 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
h1 {
background-color: #CCC;
width: 200px;
}
div.wrap {
text-align: center;
background-color: blue;
padding: 5px;
}
div.wrap h1 {
display: inline-block;
text-align: left;
}
div.wrap2 {
background-color: red;
padding: 5px;
}
div.wrap2 h1 {
margin: 0 auto;
}
<!-- content to be placed inside <body>…</body> -->
<div class="wrap">
<h1>Hey now</h1>
</div>
<div class="wrap2">
<h1>Hey now</h1>
</div>
{"view":"split","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment