table-sibling-1a.html 467 B

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