Media width px vs em. !important

Hi Peoples.

Ok, for this old man, times have changed since I used to build websites 10…somethingorothermuttermuttermutter years ago. Back then, designing for smartphones was barely even thought of.
Not so, these days. Build for mobile first seems to be the catch cry.

To that end, I found in my research an article, “The EMs have it”, on pixel vs ems when using the @media screen detect tag that is both clear and concise. Really, you couldn’t GET a better explanation than this, so I HIGHLY recommend you have a read.
You’ll prefer to be back in Kansas with Aunty EM from hereon out, I bet!!!

Cheeers and beeers
Craig

1 Like

Hi Craig!

Great article but let’s don’t forget it was written in 2012. A lot have changed in those 5 years and todays browsers have better zoom in and outs than they used to have. Also using ems may be tricky as em refers to current font size of element and there’s something called nesting ems issue. Rem is more reliable unit as it refers to root element (body in that case) so it gives you more confidence about what result you will get.

Never worked with zoom in/out as we never have time to take care of such “details” but I will try to experiment at my own projects.

Cheers!