Display an image, some text trimmed with ellipsis, and then an icon - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

Display an image, some text trimmed with ellipsis, and then an icon

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">
.left-img {
   height:35px;
   width:35px;
   margin-right:13px;
   vertical-align:middle;<!--from   ww  w.java 2s  . c om-->
}

.right-img {
   height:35px;
   width:35px;
   margin-right:13px;
   vertical-align:middle;
}

.container {
   max-width:301px;
   display:flex;
}

.text {
   text-overflow:ellipsis;
   font-size:19px;
   white-space:nowrap;
   text-overflow:ellipsys;
   overflow:hidden;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <img src="https://www.java2s.com/style/demo/InternetExplorer.png" class="left-img"> 
   <span class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. M</span> 
   <img src="https://www.java2s.com/style/demo/Google-Chrome.png" class="right-img"> 
  </div>  
 </body>
</html>

Related Tutorials