Only show one line on tr table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Row

Description

Only show one line on tr table

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">
.hoverRow p {<!-- w ww.  jav  a 2 s . com-->
   display:block;
   overflow:hidden;
   text-overflow:ellipsis;
   white-space:nowrap;
   width:100px;
}

.hoverRow tr:hover p {
   white-space:normal;
   word-wrap:normal;
   word-break:break-all;
}
</style> 
 </head> 
 <body> 
  <table border="1" class="hoverRow"> 
   <tbody> 
    <tr> 
     <td> <p>Lorem ipsum</p> </td> 
     <td> <p>Lore</p> </td> 
    </tr> 
    <tr> 
     <td> <p>Lorem ipsum</p> </td> 
     <td> <p>Lore</p> </td> 
    </tr> 
    <tr> 
     <td> <p>Lorem ipsum dolor sit amet, consectetur adi</p> </td> 
     <td> <p>Lore</p> </td> 
    </tr> 
    <tr> 
     <td> <p>Lorem ipsum</p> </td> 
     <td> <p>Lore</p> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials