table-cell-ref.html (1243B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/licenses/publicdomain/ 5 --> 6 <html><head> 7 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 8 <title>Test text-overflow:ellipsis on table-cell</title> 9 <style type="text/css"> 10 @font-face { 11 font-family: DejaVuSansMono; 12 src: url(../fonts/DejaVuSansMono.woff); 13 } 14 html,body { 15 color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono; 16 } 17 18 19 .table { 20 color: black; 21 display: table; 22 table-layout: fixed; 23 height: 5em; 24 width: 5em; 25 } 26 .row { 27 display: table-row; 28 } 29 .cell { 30 display: table-cell; 31 white-space: nowrap; 32 overflow: hidden; 33 } 34 </style> 35 </head> 36 <body> 37 <div class="table"> 38 <div class="row"> 39 <div class="cell">|||||||…</div> 40 </div> 41 <div class="row"> 42 <div class="cell"><span>|||||||…</span></div> 43 </div> 44 </div> 45 </body></html>