The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] px versus em, who wins? Reply To: px versus em, who wins?


What you may want to be careful about is using ems for things like borders. Normally you would convert 1px to 0.0625em but if the font-size of the element is smaller than 16px then the border may not be displayed at all. This behaviour seems to be inconsistent depending on the browser you’re using.


The last div’s border won’t be displayed at all in old Opera (Presto) and Webkit browsers. It will be displayed in IE and Firefox.