blob: adc68a3047bb5924ac228801f698b2a6df45ea17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>Replaced inline elements with % widths</title>
<style type="text/css">
div.a { width: 300px; height: 100px; background: red; }
div.a p { width: 200%; }
div.a img { width: 50%; height: 100px; vertical-align: bottom; }
div.b { width: 300px; position: relative; }
div.b p { width: 200%; }
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; }
</style>
</head>
<body>
<p>There should be no red below, just two 300×100 pixel green
rectangles of different shades, seperated by 1em of margin.</p>
<div class="a">
<p>
<img src="/resources/images/1x1-green" alt="Image support required for this test">
</p>
</div>
<div class="b">
<p>
<img src="/resources/images/1x1-red" alt="Image support required for this test">
<span></span>
</p>
</div>
</body>
</html>
|