Skip to content

Instantly share code, notes, and snippets.

@andrewdh
Created January 12, 2013 14:44
Show Gist options
  • Save andrewdh/4518362 to your computer and use it in GitHub Desktop.
Save andrewdh/4518362 to your computer and use it in GitHub Desktop.
Text align within circle
/**
* Text align within circle
*/
.info-title {
text-align: center;
color: #fff;
line-height: 1;
margin: 2em auto;
width: 4em;
}
.info-title:before {
content: "";
display: block;
background-color: hsl(197, 100%, 63%);
height: 4em;
border-radius: 50%;
margin-bottom: -75%;
}
<h2 class="info-title">Testy Text</h2>
<h2 class="info-title">Text</h2>
// alert('Hello world!');
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment