Align to baseline grid for text with div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Align to baseline grid for text with div

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
body {<!--from  www .  j  a va2 s  . c  om-->
   font-family:arial;
}

.container div {
   display:inline-block;
   vertical-align:baseline;
}

.text1 {
   font-size:17px;
}

.text2 {
   font-size:67px;
   color:Chartreuse;
   margin-left:3px;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="container"> 
   <div class="text1">
     jh 
   </div> 
   <div class="text2">
     jh 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials