CSS positioning input in a column by top property - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

CSS positioning input in a column by top property

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">
#stuffContainer {<!--from w  w  w. j  a  v a 2  s.com-->
   position:relative;
   border:3px dashed Chartreuse;
   height:100px
}

#stuffContainer input {
   left:21px
}

.one {
   position:absolute;
   top:0
}

.two {
   position:absolute;
   top:41px;
}

.three {
   position:absolute;
   top:81px;
}
</style> 
 </head> 
 <body> 
  <div id="stuffContainer"> 
   <input class="one"> 
   <input class="two"> 
   <input class="three"> 
  </div> 
  <p>Lore</p>  
 </body>
</html>

Related Tutorials