Saturday, February 14, 2009

Pixel 2 em calculator

Every website that I've built for the last months have been in em's instead of pixels. Well, not completely, just the font size and line height. The advantage is working with em sizes is that your font sizes are scalable in Internet Explorer. On top of that it's much easier to offer a website in another font size by changing the base font size of the body-tag.

There's only one problem. If you have to work with a design in Photoshop, everything is measured in pixels. You have to do some math to convert those pixels to em's. Now you have scary pixel/em tables, but that won't work for me. So I decided to use my ASP.NET knowledge to create a Windows .NET application. It's my first app (so be gentle with me) but it does the job. I wrote the program just for me, but since there are a lot more who make web sites in em's I decided to throw it on the web. So here it is:

Update: Version 1.1 of this tool is published on The Bright Lines.

If you want to read more about using about using em instead of pixels, I recommend the following articles: