Ok, gotcha!
In my experience, em plays the same part as percent with regards to height, 
width, margins and padding etc.
So I usually stick to percent on those. If I need a defined size, I just use px 
such as min-width or padding.

For my fonts, I use 100% body and em everywhere else with minor px settings for 
consistency on some input elements and such or on purpose. 
Makes for a good "responsive" setup I have found.

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com




> On Jul 21, 2016, at 2:01 AM, Philippe Wittenbergh <e...@l-c-n.com> wrote:
> 
> 
> Oh, sure, that is inheritance at work. For any other property that accepts a 
> `<length>`, if it is expressed using the `em` unit, it will depend on the 
> computed value of the element itself.
> 
> That means (to come back to the rem vs em topic) that the resulting value for 
> padding, border, margin, background-position, etc are depending on the 
> nesting inside the document tree if using `em` units. The `rem` unit avoids 
> that.
> 
> Philippe
> --
> Philippe Wittenbergh
> http://l-c-n.com/

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to