inline_block.rml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <rml>
  2. <head>
  3. <title>Inline-block</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <link rel="help" href="https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#inlineblock-width" />
  6. <link rel="help" href="https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" />
  7. <meta name="Description" content="Elements with 'display: inline-block' should shrink-to-fit when no width is specified. The baseline of the element should be the baseline of its last line." />
  8. <style>
  9. body {
  10. background: #ddd;
  11. color: #444;
  12. }
  13. .float {
  14. color: #393;
  15. }
  16. .left {
  17. float: left;
  18. }
  19. .right {
  20. float: right;
  21. }
  22. .iblock {
  23. display: inline-block;
  24. color: #33c;
  25. }
  26. .iblock p {
  27. text-align: right;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <div>The following text <div class="iblock">is an inline-block</div> and should flow naturally.</div>
  33. <hr/>
  34. <div>Left filler text <div class="iblock">meets an inline-block<br/>with a line-break</div> right filler text.</div>
  35. <hr/>
  36. <div>Left filler text. <div class="iblock">An inline-block. <p>A paragraph</p> Filler text.</div> Right filler text.</div>
  37. <hr/>
  38. <div>Left filler text. <div class="iblock">An inline-block. <div class="float right">Float right</div><div class="float left">Float left</div> Filler text.</div> Right filler text.</div>
  39. <hr/>
  40. <div class="iblock">Nesting inline-blocks:
  41. <div class="iblock">A<div class="iblock">B<div class="iblock">C</div></div></div>
  42. <div class="iblock">D<div class="iblock">E<div class="iblock">F</div></div></div>
  43. </div>
  44. </body>
  45. </rml>