units-005

Units: em (0.87em floats)

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: Units: em (0.87em floats)</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/units/005.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units">
 8   <style type="text/css">
 9    div { width: 8.7em; height: 8.7em; background: red; border: solid lime; }
10    span { float: left; width: 0.87em; height: 0.87em; background: green; }
11    input[type="text"] { text-align: right; }
12   </style>
13  </head>
14  <body>
15   <p>You should see no red below, just a green square with a green border.</p>
16   <div>
17    <!-- 100 spans -->
18    <span></span> <span></span> <span></span> <span></span> <span></span>
19                  <span></span> <span></span> <span></span> <span></span> <span></span>
20    <span></span> <span></span> <span></span> <span></span> <span></span>
21                  <span></span> <span></span> <span></span> <span></span> <span></span>
22    <span></span> <span></span> <span></span> <span></span> <span></span>
23                  <span></span> <span></span> <span></span> <span></span> <span></span>
24    <span></span> <span></span> <span></span> <span></span> <span></span>
25                  <span></span> <span></span> <span></span> <span></span> <span></span>
26    <span></span> <span></span> <span></span> <span></span> <span></span>
27                  <span></span> <span></span> <span></span> <span></span> <span></span>
28    <span></span> <span></span> <span></span> <span></span> <span></span>
29                  <span></span> <span></span> <span></span> <span></span> <span></span>
30    <span></span> <span></span> <span></span> <span></span> <span></span>
31                  <span></span> <span></span> <span></span> <span></span> <span></span>
32    <span></span> <span></span> <span></span> <span></span> <span></span>
33                  <span></span> <span></span> <span></span> <span></span> <span></span>
34    <span></span> <span></span> <span></span> <span></span> <span></span>
35                  <span></span> <span></span> <span></span> <span></span> <span></span>
36    <span></span> <span></span> <span></span> <span></span> <span></span>
37                  <span></span> <span></span> <span></span> <span></span> <span></span>
38   </div>
39 
40 <!-- Try different font sizes, zooms, and resolutions, as well as
41   slightly different sizes for the floats.</p>
42   <form action="" method="get">
43    <p>
44     Set each float to width: <input type="text" name="size" value="${size}" size="5">em.
45     <input type="submit" value="Generate Test">
46    </p>
47   </form>
48 -->
49  </body>
50 </html>