Skip to content

Instantly share code, notes, and snippets.

@sobstel sobstel/index.html
Created Nov 23, 2013

Embed
What would you like to do?
Centered block element with unknown width
<div id="container">
<div id="element">
centered content
</div>
</div>
#container {
text-align: center;
}
#element {
text-align: left;
display: inline-block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.