Skip to content

Instantly share code, notes, and snippets.

@ralgh
Created December 21, 2012 00:00
Show Gist options
  • Select an option

  • Save ralgh/4349713 to your computer and use it in GitHub Desktop.

Select an option

Save ralgh/4349713 to your computer and use it in GitHub Desktop.
testing units
/**
* testing units
*/
body{
text-align: center;
}
#box{
background-color: red;
display: inline-block;
width: 200px;
}
.px,.em,.in,.pt,.pct{
background-color: #fff;
border: 1px solid #000;
margin: 4px;
}
.px{
width: 96px;
}
.em{
width: 6em;
}
.in{
width: 1in;
}
.pt{
width: 72pt;
}
.pct{
width: 48%;
}
<!-- content to be placed inside <body>…</body> -->
<div id="box">
<div class="px item">96px</div>
<div class="em item">6em</div>
<div class="in item">1in</div>
<div class="pt item">72pt</div>
<div class="pct item">48%</div>
</div>
// 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