The example below shows how relative font-units scale proportionally in relation to their parent. The following HTML and CSS is used:
div.someClass { font-size: 10px; }
div.someOtherClass { font-size: 15px; }
p.theP { font-size: 2em; }<div class="someClass"> <p class="theP">Some text</p> </div> <div class="someOtherClass"> <p class="theP">Some other text</p> </div>
Paragraph 1:
Some text
Paragraph 2:
Some other text