HTML CSS examples for CSS Layout:Box
CSS Alignment Within Box
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #main-container {<!--from ww w . ja v a2 s . co m--> width:100%; border:2px solid Chartreuse; } .img-div { width:51% } .img-div img { width:100%; } .rhs { width:49%; float:right; position:relative; } .button-nav { position:absolute; bottom:11px; width:100%; } .price { float:left; } .check-btn { float:right; } </style> </head> <body> <div id="main-container"> <div class="img-div"> <img src="https://www.java2s.com/style/demo/Opera.png"> </div> <div class="rhs"> <div class="button-nav"> <span class="price">Lorem </span> <span class="check-btn"> <button>Lorem ipsum </button> </span> </div> </div> </div> </body> </html>