Image hiding text, it should take different line - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

Image hiding text, it should take different line

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.relative {<!--from   w ww . j  ava 2  s  .  co m-->
   position:relative;
   width:401px;
   height:201px;
   border:4px solid Chartreuse;
   overflow:hidden;
   display:inline-block;
}

.relative:before {
   content:'';
   float:left;
   height:21px;
}

div.absolute {
   float:right;
   clear:left;
   width:201px;
   display:inline-block;
   border:4px solid yellow;
}
</style> 
 </head> 
 <body> 
  <div class="relative"> 
   <div class="absolute"> 
    <img src="https://www.java2s.com/style/demo/Safari.png"> 
   </div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tortor in, pharetra nisl. Maecenas aliquam luctus mauris, vitae venenatis diam imp 
  </div>  
 </body>
</html>

Related Tutorials