Layout 2 Side by side DIVs within the same line stretching to right - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Float

Description

Layout 2 Side by side DIVs within the same line stretching to right

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">
.Nomemy {<!--from ww w.  j a va2  s. c  o m-->
   border:2px solid Chartreuse;
   float:left;
}

.Datamy {
   border:2px solid yellow;
   float:right;
}

.clear {
   clear:both;
}
</style> 
 </head> 
 <body> 
  <div class="my"> 
   <div class="Nomemy">
     Testing Nome 
   </div> 
   <div class="Datamy">
     Testing Data 
   </div> 
   <div class="clear"></div> 
  </div>  
 </body>
</html>

Related Tutorials