Avatar

font size growth! (General)

by Auge ⌂, Saturday, June 07, 2014, 14:26 (3583 days ago) @ ClarkT

Hello

Each response in my forum posts in a larger font, and I cannot remember how to control this feature. I want to return to one consistent size for all posts. Hope someone can help me resolve this. Sample below. Thanks! -ClarkT
[image]

Hehe, this is a nice – but in most cases unwanted – feature of the size unit em if the value differs from 1 or, in case of values with percent as unit, differs from 100%. If the value is – let's say – 1.2em or 120%, every list item, wich is a child element of another one, will have the font size of 1.2 times of the size of the parent list item (and so on and so on ...).

If you want to see more scary effects, set the font size to a lower level than 1 respectively 100%.

A solution is the use of rem (root em) instead em as the unit for font sizes. The unit rem refers to the font size setted to the element html (the browsers standard value) and does not change inside a bunch of childs of childs (like in a nested list).

It's a more or less simple task of search and replace in the CSS file. To ensure the absence of collateral damages it's wise only to change the unit for font sizes (example: font-size: 1.2em;). Everything else is a subject to CSS-experts.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread