PX to EM made simple

General project discussion. NOT for help questions.
Post Reply
Simon66
Power Poster
Power Poster
Posts: 250
Joined: Wed Aug 29, 2007 4:36 am

PX to EM made simple

Post by Simon66 »

I found this little gem, it may be a repost.
It converts font PX sizes to EMs.

http://pxtoem.com/

Just put in your body font size and everything else is done for you.

Magic!
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: PX to EM made simple

Post by JohnnyB »

nice site.
I set up my html font size as 62.5% which roughly translates to 10px.
Then em to px is really simple:
1 em = 10px
1.2em = 12px
2 em = 20px
and so on...

Then, using 'rem' as your font-size, you can use a relative font measurement without the compounding effect of em or % when used with fonts ;)
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Simon66
Power Poster
Power Poster
Posts: 250
Joined: Wed Aug 29, 2007 4:36 am

Re: PX to EM made simple

Post by Simon66 »

Thanks! I learned something new today.

I'm reading up on REM font sizing. This should save a lot of time and headaches.
Post Reply

Return to “General Discussion”