Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/CSS2/positioning/relpos-percentage-left-in-scrollable.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<p>There should be no red, and no scrollbar.</p>
<div id="container" style="overflow:auto; width:500px; background:red;">
<div style="padding-right:90%; background:yellow;">
<div style="position:relative; left:900%; width:50px; height:50px; background:cyan;">
</div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
container.scrollLeft = 123456;
test(()=> {
assert_equals(container.scrollLeft, 0);
}, "Left percentage resolved correctly for overflow contribution");
</script>