unit-rem-div-width-inner.html 219 B

1234567891011121314
  1. <style>
  2. :root { font-size: 20px }
  3. body { font-size: 25px }
  4. div {
  5. font-size: 30px;
  6. width: 15rem;
  7. }
  8. #b {
  9. border-bottom: 1px solid #f00;
  10. }
  11. </style>
  12. <body>Level 1<div id=a>Level 2<div id=b>Level 3</div></div></body>