Align text to table right - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Text

Description

Align text to table right

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum dolor sit amet, consectetur adipisci</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!-- w  ww .  ja v a 2s .c om-->
   font-family:"Trebuchet MS", sans-serif;
   font-size:13px;
   font-weight:bold;
   line-height:2.668;
   color:Chartreuse;
}

.row-one {
   display:inline-flex;
}

.text {
   width:51%;
   margin-left:2%;
   margin-top:3%;
}

table {
   width:51%;
   padding:31px 0px;
   border-collapse:collapse;
}

thead tr {
   color:yellow;
   line-height:22px;
   font-weight:bold;
   border-bottom:2px solid blue;
}

tbody tr td {
   color:pink;
   font-weight:normal;
   position:relative;
   text-align:center;
   border-bottom:2px solid OrangeRed;
}
</style> 
 </head> 
 <body> 
  <div class="row-one"> 
   <table> 
    <thead> 
     <tr> 
      <th>Lore</th> 
      <th>Lorem ip</th> 
      <th>Lorem ipsu</th> 
      <th>Lorem i</th> 
     </tr> 
    </thead> 
    <tbody> 
     <tr> 
      <td>Lore</td> 
      <td>Lor</td> 
      <td>Lor</td> 
      <td>Lo</td> 
     </tr> 
     <tr> 
      <td>Lore</td> 
      <td>Lor</td> 
      <td>Lor</td> 
      <td>Lo</td> 
     </tr> 
     <tr> 
      <td>Lore</td> 
      <td>Lor</td> 
      <td>Lor</td> 
      <td>Lo</td> 
     </tr> 
     <tr> 
      <td>Lore</td> 
      <td>Lor</td> 
      <td>Lor</td> 
      <td>Lo</td> 
     </tr> 
     <tr> 
      <td>Lore</td> 
      <td>Lor</td> 
      <td>Lor</td> 
      <td>Lo</td> 
     </tr> 
     <tr> 
      <td>Lore</td> 
      <td>Lor</td> 
      <td>Lor</td> 
      <td>Lo</td> 
     </tr> 
    </tbody> 
   </table> 
   <div class="text">
     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tortor in, pharetra nisl. Maecenas aliquam luctus mauris, vitae venenatis diam imperdiet vel. Donec tortor diam, pretium vitae n 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials