Knowledge Walls
Venkatesan
Hyderabad, Andhra Pradesh, India
Passcode:
Font size with em sizing in UI Issues of WEB UI Tips and Tricks
2233 Views
How em unit works with font-size in html 
em size unit takes parent font-size.

Example.

   If parent tag font-size is 20px then em for child element is
   1em  = 20px;
   2em  = 40px;
  
   means
       size of element = parent font size x em size

   If no parent for tag then by default em takes 16px.
Example
<div style="font-size: 30px;">
    Welcome
    <div style="font-size: 2em;">My size is 60px</div>
</div>

<div>
    Welcome
    <div style="font-size: 2em;">My size is 32px. because default size is 16px.</div>
</div>
Best Lessons of "WEB UI Tips and Tricks"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details