HTML CSS examples for CSS Widget:Table Cell
wrap table cell at a maximum width in full width table
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> table {<!--from w w w .j a v a 2 s. com--> width:100%; } th { text-align:right; width:11px; max-width:301px; white-space:nowrap; word-break:break-all; text-overflow:ellipsis; overflow:hidden; } </style> </head> <body> <table border="1"> <tbody> <tr> <th>Lorem ipsum </th> <td>Lorem</td> </tr> </tbody> </table> <br> <table border="1"> <tbody> <tr> <th>Lorem ipsum </th> <td>Lorem</td> </tr> <tr> <th>Lorem ipsum dolor</th> <td>Lorem</td> </tr> </tbody> </table> <br> <table border="1"> <tbody> <tr> <th>Lorem ipsum </th> <td>Lorem</td> </tr> <tr> <th>Lorem ipsum dolor</th> <td>Lorem</td> </tr> <tr> <th>Lorem ipsum dolor sit amet, consectetur</th> <td>Lorem</td> </tr> </tbody> </table> </body> </html>