Justify a text when a `th`'s text starts pushing the table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Text

Description

Justify a text when a `th`'s text starts pushing the table

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum dolor sit </title> 
  <style>
table {<!-- ww w  .jav a  2s .com-->
   width:201px;
   height:100px;
}

table, th, td {
   border:2px solid Chartreuse;
}

table {
   table-layout:fixed;
}

th, td {
   word-wrap:break-word;
}
</style> 
 </head> 
 <body> 
  <table> 
   <thead> 
    <tr> 
     <th class="header" align="center">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper</th> 
     <th class="header" align="center">Lo</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td class="header" align="center">Lo</td> 
     <td class="header" align="center">Lo</td> 
    </tr> 
   </tbody> 
  </table> 
  <div>
    Lorem ipsum dolor sit amet, consectetu 
  </div>  
 </body>
</html>

Related Tutorials