Image responsiveness when employing overflow-wrap property in its caption - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

Image responsiveness when employing overflow-wrap property in its caption

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
body {<!--   w w w .jav a2  s  . co m-->
   background-color:Chartreuse;
}

.canvas {
   background-color:yellow;
   padding:11px 11px 31px 11px;
   display:inline-block;
   border-radius:7px;
}

.image {
   max-width:401px;
   width:100%;
   border-radius:13px;
}

.caption-canvas {
   max-width:401px;
   text-align:center;
   margin-bottom:-11px;
   margin-top:2em;
}

.caption {
   font-size:131%;
   color:blue;
   word-break:break-all;
   hyphens:auto;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="canvas"> 
   <img src="https://www.java2s.com/style/demo/Firefox.png" class="image"> 
   <div class="caption-canvas"> 
    <span class="caption">Lorem ipsum dolor sit amet, consectetur adipisci</span> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials