019-right-bottom.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>019 right and bottom</title>
  6. <style>
  7. html, body { margin: 0; padding: 0; background: #ffffff; color: #202020; }
  8. body { font-family: sans-serif; font-size: 13px; }
  9. h1 { font-size: 20px; margin: 10px 0 4px 10px; }
  10. p { margin: 0 0 10px 10px; }
  11. .pane { float: left; width: 440px; margin-left: 10px; }
  12. .label { background: #eeeeee; padding: 4px 6px; margin-bottom: 4px; }
  13. .stage { background: #ffffff; padding: 8px; border: 1px solid #999999; }
  14. .cover { background: #eeeeee; width: 300px; height: 160px; }
  15. .box { position: absolute; width: 60px; height: 40px; background: #cc3333; }
  16. .after { background: #333333; color: #ffffff; height: 24px; margin-top: 8px; padding-left: 4px; }
  17. </style>
  18. </head>
  19. <body>
  20. <h1>019 &middot; right and bottom</h1>
  21. <p>The red box must sit at the same bottom-right position in both panes.</p>
  22. <div class="pane">
  23. <div class="label">A: right: 20px; bottom: 10px</div>
  24. <div class="stage">
  25. <div class="cover">
  26. <div class="box" style="right: 20px; bottom: 10px"></div>
  27. </div>
  28. <div class="after">after</div>
  29. </div>
  30. </div>
  31. <div class="pane">
  32. <div class="label">B: left: 220px; top: 110px</div>
  33. <div class="stage">
  34. <div class="cover">
  35. <div class="box" style="left: 220px; top: 110px"></div>
  36. </div>
  37. <div class="after">after</div>
  38. </div>
  39. </div>
  40. </body>
  41. </html>