Align vertically input elements in div - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

Align vertically input elements in div

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">
.fillform {<!--  www. ja  v a2  s.  c  o m-->
   position:relative;
   width:100%;
   height:34%;
   bottom:0;
   background:Chartreuse;
}

.fillform div {
   position:absolute;
   float:left;
   width:100%;
   height:201px;
   box-sizing:border-box;
   border:3px solid yellow;
}

.fillform div input {
   display:block;
   border:3px solid blue;
   box-sizing:border-box;
   vertical-align:middle;
}
</style> 
 </head> 
 <body> 
  <form class="fillform"> 
   <div> 
    <input type="text" placeholder="Your name"> 
    <input type="text" placeholder="E-mail"> 
    <input type="submit"> 
   </div> 
  </form>  
 </body>
</html>

Related Tutorials