Aligning images with text to the center - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Alignment

Description

Aligning images with text to the center

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">
.container span {
   display:inline-block;
   vertical-align:middle;<!-- w w w. jav  a 2 s.co  m-->
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <span class="icon"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> </span> 
   <span>555-1212</span> 
  </div>  
 </body>
</html>

Related Tutorials