Table beside a floating element - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Layout

Description

Table beside a floating element

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">
img {<!--from  ww  w  .ja  v  a  2  s .  co m-->
   float:right;
}

#wrapper {
   background-color:Chartreuse;
   right:286px;
   position:absolute;
}

#wrapper table {
   table-layout:fixed;
   width:100%;
   background-color:yellow;
}

td {
   padding:6px;
   border:2px solid blue;
   border-collapse:collapse;
}
</style> 
 </head> 
 <body> 
  <img src="https://www.java2s.com/style/demo/Google-Chrome.png" alt=""> 
  <div id="wrapper"> 
   <table> 
    <tbody> 
     <tr> 
      <td>Lore</td> 
      <td>Lorem ips</td> 
     </tr> 
     <tr> 
      <td>Lore</td> 
      <td></td> 
     </tr> 
     <tr> 
      <td>Lore</td> 
      <td>Lo</td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials