hide overflow in a <td> - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

hide overflow in a <td>

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
table {<!--from  www .  j a  v  a2 s  .c o m-->
   table-layout:fixed;
}

td {
   border:2px solid Chartreuse;
   max-width:100px;
   overflow:hidden;
   white-space:nowrap;
}
</style> 
 </head> 
 <body> 
  <table> 
   <thead> 
    <tr> 
     <th class="first">Lorem i</th> 
     <th class="last">Lorem </th> 
     <th>Lorem </th> 
     <th>Lorem ipsum</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td class="first"> <span>Lorem ipsum dolor sit ame</span> </td> 
     <td class="last">Lor</td> 
     <td class="info">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi u</td> 
     <td class="join-date">Lorem ipsum </td> 
    </tr> 
    <tr> 
     <td class="first">Lorem</td> 
     <td class="last">Lorem i</td> 
     <td class="info">Lorem ipsum dolor sit</td> 
     <td class="join-date"> 
      <div>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fe 
      </div> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials