Use table cell layout to layout div row and cell - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Use table cell layout to layout div row and cell

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">

.row {<!--   ww  w.  j av a 2s. co m-->
   display: table;
}
.col,
button {
   display: table-cell;
   padding: 8px 12px;
   outline: 1px dashed red;
}


      </style> 
 </head> 
 <body> 
  <div class="row"> 
   <div class="col">
     input auto 100% of the free width space 
   </div> 
   <button type="submit"> button <br> auto of the <br> inner content </button> 
  </div>  
 </body>
</html>

Related Tutorials