css - Will using body {font-size: 10px} change the way ems work? -


i'm trying design responsive layout , i'm using trick make use of ems easier. in body, have this: body {font-size: 10px}. question is: change way ems work? if set p {font-size: 1em} 10px regardless of screen size?

setting font-size not change way em unit works.

if set p {font-size: 1em}, then, usual css caveats (other style sheets might set font-size on p, etc.), font size in p equal font size of parent, happens default anyway via inheritance (when no style sheet sets font-size on p element).

if p element child of body , have set body {font-size: 10px}, then, caveats, p element’s font size 10 css pixels. size of css pixel depends on device , need not equal physical device pixel; see 5.2. absolute lengths: ‘cm’, ‘mm’, ‘in’, ‘pt’, ‘pc’, ‘px’ units in css values , units module level 3 cr (which more realistic css 2.1).


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -