overflow_nested.rml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <rml>
  2. <head>
  3. <title>Nested overflow</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <meta name="Description" content="The deepest element in the tree, whose overflow property is not visible, should catch the overflow." />
  6. <style>
  7. body {
  8. display: block;
  9. background: #ddd;
  10. color: #444;
  11. }
  12. div.overflow { overflow: auto; }
  13. div.outer {
  14. width: 200dp;
  15. height: 150dp;
  16. border: 1dp #fff;
  17. margin-bottom: 30dp;
  18. }
  19. div.inner {
  20. border: 1dp black;
  21. width: 150dp;
  22. height: 100dp;
  23. }
  24. div.wide {
  25. width: 300dp;
  26. height: 20dp;
  27. text-align: center;
  28. border: 1dp #0a0;
  29. margin: 5dp;
  30. background-color: #eee;
  31. }
  32. div.float {
  33. float: left;
  34. width: 40dp;
  35. height: 70%;
  36. border: 1dp black;
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <p>There should should only be one scroll bar visible, inside the black border.</p>
  42. <div class="outer overflow">
  43. <div class="inner overflow">
  44. <div class="wide">Wide element</div>
  45. </div>
  46. </div>
  47. <p>There should should only be one scroll bar visible, inside the white border.</p>
  48. <div class="outer overflow">
  49. <div class="inner">
  50. <div class="wide">Wide element</div>
  51. </div>
  52. </div>
  53. <div class="outer overflow">
  54. <div class="float">
  55. The text in this box should overflow its scroll container, thereby producing a scrollbar inside the white border.
  56. </div>
  57. </div>
  58. </body>
  59. </rml>