On Oct 21, 2011, at 12:09 PM, Elli Vizcaino wrote: > The photoshop analogy helps me get it but then I guess I must be > misunderstanding the meaning of inheritance, can you tell me what exactly > does the definition of inherit mean?
Here is the CSS 2.1 definition of 'inherit': http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit Note that only _some_ properties are inherited. For example, the margin property does not inherit, but the color property does (look them up in the specs). You can set the color property on body and all descendants of body will have that color applied (unless you override it on a specific element). On the hand, you can specify a large top and bottom margin on a div, but the descendants <p> of that div won't have that large margin, unless you explicitly specify that they do so. The opacity property does _not_ inherit, as already noted. http://www.w3.org/TR/css3-color/#transparency The descendants of a box with the opacity set appear translucent _because_ the parent box as a whole unit is made translucent. 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/