Move inline image to very first place in text using css - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

Move inline image to very first place in text using css

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:before {<!-- w w  w . ja v a  2  s .c  o m-->
   content:url('https://www.java2s.com/style/demo/Google-Chrome.png');
}

div img {
   display:none;
}
</style> 
 </head> 
 <body> 
  <div>
    Lorem ipsum dolor sit amet, consectet 
   <p>Lorem ipsum do</p>Lorem ipsum dol 
   <img src="https://www.java2s.com/style/demo/Safari.png">Lorem ipsum dol 
  </div>  
 </body>
</html>

Related Tutorials