Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created April 23, 2015 12:58
Show Gist options
  • Select an option

  • Save gunnarbittersmann/70f971a159aeccb29f6f to your computer and use it in GitHub Desktop.

Select an option

Save gunnarbittersmann/70f971a159aeccb29f6f to your computer and use it in GitHub Desktop.
vertically centered
/**
* vertically centered
*/
figure
{
display: flex;
flex-direction: column;
justify-content: center;
width: 12em;
height: 12em;
background: hsl(200, 40%, 40%);
}
p
{
background: hsl(200, 40%, 80%);
padding: 0.5em;
font-family: sans-serif;
}
<figure>
<p>vertically centered</p>
</figure>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment