| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Reference for position:sticky left constraint should behave correctly for
<th> elements</title> |
| 3 |
| 4 <style> |
| 5 .group { |
| 6 position: relative; |
| 7 width: 250px; |
| 8 height: 150px; |
| 9 } |
| 10 |
| 11 .scroller { |
| 12 position: relative; |
| 13 width: 200px; |
| 14 height: 100px; |
| 15 overflow-x: auto; |
| 16 overflow-y: hidden; |
| 17 } |
| 18 |
| 19 .contents { |
| 20 height: 10px; |
| 21 width: 500px; |
| 22 } |
| 23 |
| 24 .indicator { |
| 25 position: absolute; |
| 26 background-color: green; |
| 27 top: 0; |
| 28 height: 50px; |
| 29 width: 50px; |
| 30 } |
| 31 </style> |
| 32 |
| 33 <script> |
| 34 window.addEventListener('load', function() { |
| 35 document.getElementById('scroller1').scrollLeft = 50; |
| 36 document.getElementById('scroller2').scrollLeft = 125; |
| 37 document.getElementById('scroller3').scrollLeft = 250; |
| 38 }); |
| 39 </script> |
| 40 |
| 41 <div class="group"> |
| 42 <div id="scroller1" class="scroller"> |
| 43 <div class="indicator" style="left: 100px;"></div> |
| 44 <div class="contents"></div> |
| 45 </div> |
| 46 </div> |
| 47 |
| 48 <div class="group"> |
| 49 <div id="scroller2" class="scroller"> |
| 50 <div class="indicator" style="left: 150px;"></div> |
| 51 <div class="contents"></div> |
| 52 </div> |
| 53 </div> |
| 54 |
| 55 <div class="group"> |
| 56 <div id="scroller3" class="scroller"> |
| 57 <div class="indicator" style="left: 250px;"></div> |
| 58 <div class="contents"></div> |
| 59 </div> |
| 60 </div> |
| 61 |
| 62 <div>You should see three green boxes above. No red should be visible.</div> |
| OLD | NEW |