block-sibling-2.html (441B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style type="text/css"> 5 #a { 6 height: 20px; 7 background-color: red; 8 margin-bottom: 20px; 9 } 10 #b { 11 height: 20px; 12 background-color: blue; 13 margin-top: 10px; 14 margin-bottom: 10px; 15 position: relative; 16 top: 40px; 17 } 18 #c { 19 height: 20px; 20 background-color: green; 21 margin-top: 20px; 22 position: relative; 23 top: -40px; 24 } 25 </style> 26 </head> 27 <body> 28 <div id="a"></div> 29 <div id="b"></div> 30 <div id="c"></div> 31 </body> 32 </html>