Width is set different on input elements - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

Width is set different on input elements

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">
.container {<!--   ww  w. j  ava2s. co m-->
   border:6px solid Chartreuse;
   margin:0 51px;
   display:inline-block;
}

#second {
   width:100px;
   border:6px solid yellow;
   display:inline-block ;
}

#field {
   width:251px;
   border:6px solid blue;
}

#button {
   width:100px;
   box-sizing:border-box;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <input type="text" id="field"> 
   <input type="text" id="button" value="Search"> 
  </div>  
 </body>
</html>

Related Tutorials