stretch input field to full width - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

stretch input field to full width

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">
.formList {<!--   w w w. j a  v  a2  s.  c o  m-->
   border:2px solid Chartreuse;
   padding:11px;
   margin:11px;
}

label {
   width:201px;
   margin-left:-201px;
   float:left;
}

input, select {
   width:100%;
}

li {
   padding-left:201px;
}
</style> 
 </head> 
 <body> 
  <ul class="formList"> 
   <li> <label for="input_1">Lorem ipsum dol</label> <input id="input_1" name="input_1" type="text"> </li> 
   <li> <label for="input_2">Lorem ipsum d</label> <select id="input_2" name="input_2"></select> </li> 
  </ul>  
 </body>
</html>

Related Tutorials