Dear Jukka --

When you say :

> When you set background-color: #fff, you do not affect other background
> properties in any way. Whether they are inherited or not depends on other
> factors. The main factor is that according to CSS specifications, none of
> the background properties is inherited in the normal sense (inherited in the
> absence of any CSS rule that assigns a value to the property), though in
> principle they can be inherited if the explicit value inherit is used (as
> for any property).

I am confused.  If you take the example below, which may
be seen online at

        http://web-consultants.org.uk/sites/development/test-inheritance.html

both the first outer div and the first inner (nested) div
shew the same  background colour.  Now there is, in the code,
no explicit use of "inherit" to cause the inner div to inherit
the background colour of the outer, so why is this apparent
inheritance taking place ?  Or is it simply that the
default background colour is "transparent", and therefore
no inheritance is taking place but rather the colour is
simply shewing through ?

Philip Taylor
--------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Inheritance ?</title>
<style type="text/css">
        DIV {border: 1px solid transparent}
</style>
</head>

<body>
<div style="width: 300px; height: 200px; background-color: blue; 
z-index: 1">
        <div style="width: 200px; height: 100px; z-index: 2; margin: 15%">
        </div>
</div>
<div><span>&nbsp;</span></div>
<div style="width: 300px; height: 200px; background-color: blue; 
z-index: 1">
        <div style="width: 200px; height: 100px; background-color: yellow; 
z-index: 2; margin: 15%">
        </div>
</div>
</body>
</html>
______________________________________________________________________
css-discuss [cs...@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