Description of css em functionality

Dragan Eror's picture
in

1em = (font-size value of current element)

font-size: 1em; /*16px*/ /*16(default font size) x 1(our property) = 16*/
font-size: 0.75em; /*12px*/ /*16(default font size) x 0.75(our property) = 12*/
font-size: 0.833em; /*10px*/ /*12(parent font size) x 0.833(our property) = 10*/
font-size: 1.8em; /*18px*/ /*10(parent font size) x 1.8(our property) = 18*/
font-size: 1em; /*18px*/ /*18(parent font size) x 1(our property) = 18*/

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.