Prevent Table from Expanding When Content Becomes Bold on Hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table

Description

Prevent Table from Expanding When Content Becomes Bold on Hover

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  w  w  w  .j  a  v a 2s.com-->
   width:100%;
   border:2px solid Chartreuse;
   margin-top:0;
   border-spacing:6px;
   border-collapse:separate;
}

table tr:hover {
   font-weight:601;
}

td::after {
   display:block;
   content:attr(title);
   font-weight:601;
   color:yellow;
   height:2px;
   margin-bottom:-2px;
   visibility:hidden;
   overflow:hidden;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td title="Cell One">Lorem ip</td> 
     <td title="Cell Two">Lorem ip</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials