inherit-border-padding-000

Explicit Inheritance

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: Explicit Inheritance</title>
 5   <link title="6.2 Inheritance" href="http://www.w3.org/TR/CSS21/cascade.html#inheritance" rel="help">
 6   <link title="8.4 Padding properties" href="http://www.w3.org/TR/CSS21/box.html#padding-properties" rel="help">
 7   <link title="8.5 Border properties" href="http://www.w3.org/TR/CSS21/box.html#border-properties" rel="help">
 8   <link rel="author" href="mailto:Alan.Harder@Sun.COM" title="Alan Harder">
 9   <style type="text/css">
10    .a { border: 0 solid lime; }
11    .b { border-width: thick; border-style: inherit; border-color: inherit; }
12    .c { padding: 8px 0; background-color: red; }
13    .d { padding: inherit; background-color: lime; }
14   </style>
15  </head>
16  <body>
17   <p class="a">
18    This sentence should have no border. 
19    <span class="b"> This sentence should have a green border. </span>
20   </p>
21   <p>
22    <span class="c"><span class="d"> This sentence should be in a green bar, with no red present. </span></span>
23   </p>
24  </body>
25 </html>