CSS Horizontal alignment with form fields - HTML CSS CSS Form

HTML CSS examples for CSS Form:Form

Description

CSS Horizontal alignment with form fields

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">
.small {<!--from  ww  w. j ava  2s  . co  m-->
   border:2px solid Chartreuse;
   float:left;
   height:21px;
   width:51px;
   margin-right:21px;
}

.big
 {
   border:2px solid yellow;
   float:left;
   clear:left;
   height:201px;
   width:195px;
   margin-top:21px;
}
</style> 
 </head> 
 <body> 
  <div> 
   <div class="small"></div> 
   <div class="small"></div> 
   <div class="small"></div> 
   <div class="big"></div> 
  </div>  
 </body>
</html>

Related Tutorials