Align content to the right of box - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Parent Container

Description

Align content to the right of box

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
.header-wrap {<!--   www . j  a v a2 s  . c o m-->
   margin:0 auto;
   width:201px;
   border:2px solid Chartreuse;
}

.header-wrap p {
   text-align:right;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="header-wrap"> 
   <h2> title </h2> 
   <p class="company-desc">description float right</p> 
  </div>  
 </body>
</html>

Related Tutorials