CSS - Text and image in link with text vertically aligned middle - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Alignment

Description

CSS - Text and image in link with text vertically aligned middle

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">
div {<!-- ww w . j a v a2  s  .  com-->
   height:151px;
   line-height:151px;
}

img {
   float:left;
}
</style> 
 </head> 
 <body> 
  <div onclick="window.location = '#'"> 
   <img src="https://www.java2s.com/style/demo/Opera.png">Lorem ipsu 
  </div>  
 </body>
</html>

Related Tutorials