Make button, input fill entire table cell - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Make button, input fill entire table 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">
table {<!--from w  w  w.  j ava2s .  com-->
   border-collapse:collapse;
}

tr, td {
   border:2px solid;
}

tr {
   height:auto;
   text-align:center;
   margin:0;
   padding:0;
}

td {
   padding:0px;
}

input, select {
   margin:0;
   padding:0;
   height:100%;
   width:100%;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td> <select> <option>Lorem i</option> <option>Lorem i</option> </select> </td> 
     <td> <input type="button" value="test"> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials