Html table width larger than page width right and padding - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Width

Description

Html table width larger than page width right and padding

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 2 s  .com-->
   width:100%;
   padding:11px 0px 11px 0px;
   background-color:Chartreuse;
}

td {
   background-color:yellow;
}

.container {
   margin-right:100px;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <table> 
    <tbody> 
     <tr> 
      <td>L</td> 
      <td>L</td> 
      <td>L</td> 
     </tr> 
     <tr> 
      <td>L</td> 
      <td>L</td> 
      <td>L</td> 
     </tr> 
     <tr> 
      <td>L</td> 
      <td>L</td> 
      <td>L</td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials