| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
| <title>Replaced inline elements with % widths</title> |
| div.a { width: 300px; height: 100px; background: red; } |
| div.a img { width: 50%; height: 100px; vertical-align: bottom; } |
| div.b { width: 300px; position: relative; } |
| div.b img { width: 50%; height: 100px; vertical-align: bottom; } |
| div.b span { position: absolute; top: 0; left: 0; background: green; width: 300px; height: 100px; } |
| <p>There should be no red below, just two 300×100 pixel green |
| rectangles of different shades, seperated by 1em of margin.</p> |
| <img src="resources/1x1-green.png" alt="Image support required for this test"> |
| <img src="resources/1x1-red.png" alt="Image support required for this test"> |