Aligning text to right of image inside <li> - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Alignment

Description

Aligning text to right of image inside <li>

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">
ul<!--from   w w w. jav  a  2s. com-->
 {
   padding:0;
   margin:0;
   list-style:none;
}

ul li {
   display:flex;
   flex-direction:row;
   justify-content:flex-start;
   align-items:center;
   margin-bottom:21px;
}

ul li img {
   margin-right:11px;
}
</style> 
 </head> 
 <body> 
  <section id="providerBenefits"> 
   <div class="container"> 
    <ul id="benefitListRight"> 
     <li> <img src="https://www.java2s.com/style/demo/Firefox.png"> <span> 80-85% comprehensive care plan <br> established, implemented, and monitored </span> </li> 
     <li> <img src="https://www.java2s.com/style/demo/Firefox.png"> <span> 80-85% comprehensive care plan <br> established, implemented, and monitored </span> </li> 
    </ul> 
   </div> 
  </section>  
 </body>
</html>

Related Tutorials