Align text within div tags to the right - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Align text within div tags to the 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">
.fl {<!--from   ww w. java2 s.co m-->
   float:left;
}

.fr {
   float:right;
}

.label {
   clear:both;
}
</style> 
 </head> 
 <body> 
  <div class="label" date1="10/5/2016" date2="10/20/2016" id="mydiv"> 
   <span class="fl">Start Date 10/5/2016</span> 
   <span class="fr">End Date 10/20/2016</span> 
  </div>  
 </body>
</html>

Related Tutorials