views:

99

answers:

2

Should i use Width, height, margin, padding, line-height in em also if i'm using em for text sizing? is it good for accessibility?

A: 

If they are to style the container of text content, I would say yes for line-height and maybe height.

For width/padding/margin of a text container where it's constrained by other layout elements, you might choose to have them sized independently of the font-size for aesthetic reason.

There's a related doctype.com question: does it really matter nowadays: px VS .em type scale units

o.k.w
+1  A: 

There's nothing wrong with using pixels for font sizes now. Modern browsers can distinguish text from layout when zooming, so your boxes will retain their correct style while text will be resized.

Tor Valamo
Em vs pt/px may not always be a browser zoom issue.
o.k.w
true, but px is also way easier to work with, unless you intentionally want each container to be relative to the parent... which is rarely the case anyways, so why bother with em.
Tor Valamo
True as well. An example of my concern is the rendering of different fonts having different pixel sizes for say font-type fallback for an unavailable font under certain OS.
o.k.w