Link up input[type=text] with a Button - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button

Description

Link up input[type=text] with a Button

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

.elegantaeronamefinder{<!--  ww  w.j  a  va 2 s  . c o m-->
   width: 800px;
   margin-right: auto;
   margin-left: auto;
   background:#F2F7FA;
   padding: 30px 30px 0px 30px;
   min-height: 120px; 
   -webkit-box-shadow: 0 0 5px #868686;
   box-shadow: 0 0 5px #868686;
   color: #666;
   border-collapse: collapse;
   display: table;
   text-align: center;
}
.elegantaeronamefinder input[type="text"], .elegant-aeronamefinder textarea {
   color: #888;
   width:250px;
   padding: 5px 4px 0px 5px;
   margin-right: 6px;
   margin-left: 5px;
   border: 1px solid #CEE2E7;
   background: #FBFBFB;
   outline: 0;
   -webkit-box-shadow: inset 1px 1px 2px rgba(200, 200, 200, 0.2);
   box-shadow: inset 1px 1px 2px rgba(200, 200, 200, 0.2);
   vertical-align: middle; /*added in to align*/
}
.elegantaeronamefinder .button{
   padding: 10px 30px 10px 30px;
   background: #44B6F5;
   border: none;
   color: #FFF;
   font-weight:bold;
   vertical-align: middle; /*added in to align*/
   margin-bottom: 6px;
   margin-top: 5px;
}
.wrapper{
   display: table-cell;
   vertical-align: middle;
}


      </style> 
 </head> 
 <body> 
  <div class="elegantaeronamefinder"> 
   <div class="wrapper"> 
    <input type="text" id="search_name" name="search_name"> 
    <input type="submit" class="button" value="GO" id="search_button" name="search_button"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials