I'm attending erubycon

Archive for February, 2007

Apple.com 1997 (hacked)

What Apple’s site looked like when it was hacked.

Dead Things at the Market

EM Calculator

Here is a very nice tool to help convert pixels into em units. It also shows how the em unit of a parent element effects the child elements.

I’ve been using em units instead of pixels for a while now and think the somewhat quirky behavior is worth dealing with. Here is a little hack I use:

/* CSS */
div#container { font-size:62.5%; }
p { font-size:1.2em; }
<!-- HTML -->
<div id="container">
  <p>Lorem ipsum dolor!</p>
</div>

The 62.5% in div#container basically resets 1.0em to 10px. So… if you want all paragraphs to be around 12px in size, you set them to 1.2em.

Categories

Archives

Buddies

More