inline-block-width-001b.xht (808B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> 2 <title>CSS Test: Test for 'width: auto' on inline-block</title> 3 <link rel="author" title="L. David Baron" href="https://dbaron.org/" /> 4 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> 5 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" /> 6 <link rel="match" href="inline-block-width-001-ref.xht"/> 7 <style type="text/css"> 8 body > div { width: 10em; } 9 body > div > div { display: inline-block; background: green; color: white; width: 10em; } 10 </style> 11 </head> 12 <body> 13 <div>x <div>This is some text that is wider than 10em but has no words wider than 10em.</div> z</div> 14 15 16 </body></html>