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