abspos-026

Positioning replaced elements with four offsets

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: Positioning replaced elements with four offsets</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 7   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/025.html" type="text/html">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width">
 9   <style type="text/css">
10    img { position: absolute; left: 4em; right: 4em; top: 4em; bottom: 4em; }
11    div { position: absolute; left: 4em; top: 4em; height: 15px; width: 15px; background: green; }
12 }
13   </style>
14  </head>
15  <body>
16   <p>There should be a green square and no red. <img src="support/swatch-red.png" alt="FAIL"></p>
17   <div></div>
18  
19 
20 </body>
21 </html>