Align second column of div to the right edge - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Align second column of div to the right edge

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
.wrapper {<!--from w w w .jav  a 2 s  .  c  om-->
   width:821px;
}

.container-2col-nm {
   display:flex;
   justify-content:center;
}

.container-2col-nm>div {
   margin:0;
   padding:0;
   text-align:left;
}

.box-2col-nm-1 {
   width:51%;
}

.box-2col-nm-2 {
   width:51%;
}

.rimg {
   display:block;
   float:right;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="wraper"> 
   <div class="container-2col-nm"> 
    <div class="box-2col-nm-1"> 
     <img class="limg" height="200" src="https://www.java2s.com/style/demo/InternetExplorer.png" width="350"> 
    </div> 
    <div class="box-2col-nm-2"> 
     <img class="rimg" height="200" src="https://www.java2s.com/style/demo/Google-Chrome.png" width="350"> 
    </div> 
   </div> 
   <p> <img alt="Find Opportunities" height="86" src="https://www.java2s.com/style/demo/Opera.png" width="720"> </p> 
  </div>  
 </body>
</html>

Related Tutorials