align specific text with image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Alignment

Description

align specific text with image

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">
#together {<!-- w  ww  .j av  a2 s.c  o m-->
   border:4px solid Chartreuse;
}

.left {
   display:inline-block;
   width:201px;
   clear:left;
}

.right {
   display:inline-block;
   clear:right;
   margin-left:51px;
   width:201px;
}
</style> 
 </head> 
 <body> 
  <div id="together"> 
   <img class="left" src="https://www.java2s.com/style/demo/Opera.png"> 
   <div id="description" class="right">
     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vesti 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials