Home › Forums › CSS › [Solved] px versus em, who wins? › Reply To: px versus em, who wins?
October 2, 2013 at 3:34 am
#151873
tomasz86
Participant
What you may want to be careful about is using em
s 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.
Check: http://codepen.io/tomasz86/full/EmuCx
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.