Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html class="reftest-wait"> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>The Grid in an overflowing div</title> |
michael@0 | 5 | <style type="text/css"> |
michael@0 | 6 | html { |
michael@0 | 7 | padding: 0; |
michael@0 | 8 | border: 0; |
michael@0 | 9 | margin: 0; |
michael@0 | 10 | } |
michael@0 | 11 | body { |
michael@0 | 12 | padding: 0; |
michael@0 | 13 | border: 0; |
michael@0 | 14 | margin: 0; |
michael@0 | 15 | } |
michael@0 | 16 | table { |
michael@0 | 17 | padding: 0; |
michael@0 | 18 | margin: 0; |
michael@0 | 19 | border-top: none; |
michael@0 | 20 | border-left: none; |
michael@0 | 21 | border-right: 1px solid black; |
michael@0 | 22 | border-bottom: 1px solid black; |
michael@0 | 23 | } |
michael@0 | 24 | tr { |
michael@0 | 25 | padding: 0; |
michael@0 | 26 | border: 0; |
michael@0 | 27 | margin: 0; |
michael@0 | 28 | } |
michael@0 | 29 | td { |
michael@0 | 30 | /* top border counts as part of height, but |
michael@0 | 31 | left border doesn't count as part of width. |
michael@0 | 32 | go figure. |
michael@0 | 33 | */ |
michael@0 | 34 | min-height: 99px; |
michael@0 | 35 | height: 99px; |
michael@0 | 36 | max-height: 99px; |
michael@0 | 37 | min-width: 99px; |
michael@0 | 38 | width: 99px; |
michael@0 | 39 | max-width: 99px; |
michael@0 | 40 | padding: 0; |
michael@0 | 41 | border-left: 1px solid black; |
michael@0 | 42 | border-top: 1px solid black; |
michael@0 | 43 | border-right: none; |
michael@0 | 44 | border-bottom: none; |
michael@0 | 45 | margin: 0; |
michael@0 | 46 | font-size: 12px; |
michael@0 | 47 | text-align: left; |
michael@0 | 48 | vertical-align: top; |
michael@0 | 49 | font-family: monospace; |
michael@0 | 50 | } |
michael@0 | 51 | </style> |
michael@0 | 52 | <script type="text/javascript"> |
michael@0 | 53 | var val = 900; |
michael@0 | 54 | function scroll() { |
michael@0 | 55 | var div = document.getElementById('nest'); |
michael@0 | 56 | div.scrollLeft = val; |
michael@0 | 57 | div.scrollTop = val; |
michael@0 | 58 | document.documentElement.removeAttribute('class'); |
michael@0 | 59 | } |
michael@0 | 60 | |
michael@0 | 61 | window.onload = scroll; |
michael@0 | 62 | </script> |
michael@0 | 63 | </head> |
michael@0 | 64 | <body> |
michael@0 | 65 | <div style="color: red">this text is above the scrolling div. the div below is 300x400</div> |
michael@0 | 66 | <div id="nest" style="overflow: scroll; height: 400px; width: 300px; border: solid 1px black"> |
michael@0 | 67 | <div style="background: blue; width: 5000px; height: 5000px;"></div> |
michael@0 | 68 | </div> |
michael@0 | 69 | <div style="color: red">this text is below the scrolling div</div> |
michael@0 | 70 | </body> |
michael@0 | 71 | </html> |