Replaced Elements


This browser

ahem, image


 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: Replaced Elements</title>
 5   <meta name="flags" content="ahem image">
 6   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#replaced-elements">
 7   <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">
 8   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 9   <style type="text/css">
10    div    { margin: 0; background: url(support/swatch-red.png) center repeat-y; font-size: 10px; }
11    .a img { display: block; margin-right: auto; margin-left: auto; width: auto; }
12    .b     { text-align: center; }
13    .b img { vertical-align: top; }
14    .c     { text-align: center; font: 15px/1 Ahem; color: blue; }
15   </style>
16   <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#alignment-prop" title="16.2 Alignment: the 'text-align' property">
17   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#block-replaced-width" title="10.3.4 Block-level, replaced elements in normal flow">
18   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#line-height" title="10.8 Line height calculations: the 'line-height' and 'vertical-align' properties">
19   <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties" title="14.2.1 Background properties: 'background-color', 'background-image', 'background-repeat', 'background-attachment', 'background-position', and 'background'">
20  </head>
21  <body>
22   <p>There should be a single small column of blue below with no red:</p>
23   <div class="a"><img src="support/swatch-blue.png" alt="FAIL: Replaced content did not get replaced."></div>
24   <div class="b"><img src="support/swatch-blue.png" alt="FAIL: Replaced content did not get replaced."></div>
25   <div class="c">X</div>
26  </body>
27 </html>