

No way around that, other than removing the tag. Those two values will cascade (1.2 x 1.2) and that list item will be bigger in font-size than any of the others. Looks great for you today, but tomorrow some content is published to the site that has a paragraph inside a list item.


For example, you might set both your “p” (paragraph) and “li” (list item) font-sizes to be 1.2em. If you are using em’s as a straight substitution for pixel values, this can cause problems. Every em value is relative to its parents value. There is one potential concern with em’s, with regards to #3. That exact proportional relationship makes em values a powerful web design technique. If you have a box that is 10em in height, and a font inside that is 1em in size, it will take up exactly 1/10 the height of that box.

Em’s have a direct relationship to each other in this way. Elastic width sites use em values for everything, which essentially makes the site “zoomable”, meaning that when you bump the font-size up everything bumps up all the way down to the width of the site. If you basically want to use pixels but don’t like the accessibility problems, em’s may be the ticket for you.Įm’s aren’t just for fonts, it’s a unit of measure that you can use for any other length (height, width, etc).
