table-caption-4.html (627B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style> 5 #rel { 6 position: relative; 7 margin: 2px; 8 padding: 0; 9 } 10 .fixed, .abs { 11 position: fixed; 12 margin: 0; 13 padding: 0; 14 top: 25px; 15 left: 25px; 16 width: 50px; 17 height: 50px; 18 background-color: green; 19 } 20 #bad { 21 background-color: red; 22 } 23 </style> 24 </head> 25 <body> 26 The green square should completely cover the red square. 27 <div class="abs" id="bad"></div> 28 <table> 29 <caption id="rel"><div class="fixed"></div></caption> 30 </table> 31 </body> 32 </html>