table-cell-background-local-003.html (1380B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Backgrounds and Borders Test: table cell background-image with local attachment</title> 6 7 <!-- 8 9 Created: December 8th 2023 10 11 Last modified: December 8th 2023 12 13 --> 14 15 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 16 <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#background-attachment"> 17 <link rel="help" href="https://www.w3.org/TR/css-overflow-3/#overflow-control"> 18 <link rel="match" href="reference/table-cell-background-local-003-ref.html"> 19 20 <style> 21 td 22 { 23 height: 100px; 24 padding: 0px; 25 vertical-align: top; 26 width: 100px; 27 } 28 29 td#middle-cell 30 { 31 background: url("support/500x500-red-with-green-center.png") local; 32 overflow: auto; 33 } 34 35 div#outer 36 { 37 height: 0px; 38 width: 0px; 39 } 40 41 div#inner 42 { 43 height: 300px; 44 width: 300px; 45 } 46 </style> 47 48 <body onload="document.getElementById('middle-cell').scrollTop = 200; document.getElementById('middle-cell').scrollLeft = 200;"> 49 50 <p>Test passes if there is a filled green square and <strong>no red</strong>. 51 52 <table> 53 54 <tr><td><td><td> 55 56 <tr> 57 <td> 58 <td id="middle-cell"> 59 <div id="outer"> 60 <div id="inner"></div> 61 </div> 62 <td> 63 64 <tr><td><td><td> 65 66 </table>