|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 <head> |
|
4 <!-- specifying all heights in em units so that large font sizes |
|
5 don't disrupt relationships; everything will scale together --> |
|
6 <style type="text/css"> |
|
7 #parent { |
|
8 width: 200px; |
|
9 background-color: lightgreen; |
|
10 } |
|
11 #inline-block1, #inline-block2 { |
|
12 height: 2em; |
|
13 background-color: green; |
|
14 } |
|
15 #margin { |
|
16 height: 2em; |
|
17 } |
|
18 </style> |
|
19 </head> |
|
20 <body> |
|
21 <div id="parent"> |
|
22 <div id="inline-block1"></div> |
|
23 <div id="margin"></div> |
|
24 <div id="inline-block2"></div> |
|
25 </div> |
|
26 </body> |
|
27 </html> |