abspos-width-005

Absolute Positioning: max-width

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html lang="en">
 3  <head>
 4   <title>CSS Test: Absolute Positioning: max-width</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/width/005-demo.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width">
 8   <style type="text/css">
 9    .relative { position: relative; border: fuchsia thin solid; padding: 1em; width: 10em; height: 5em; }
10    .absolute { position: absolute; border: aqua thin solid; padding: 1em; max-width: 3em; }
11   </style>
12  </head>
13  <body>
14   <p>The blue box should be well within the pink box, but its text should overflow out of both boxes.</p>
15   <div class="relative">
16    <div class="absolute"> overflowyflowyflowyflowyflowyflowyflowyflowy </div>
17   </div>
18  </body>
19 </html>