Positioning text relative to image position - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Position

Description

Positioning text relative to image position

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">
.image-container {<!--  w  w w  .j av a 2  s  . c  o  m-->
   text-align:center;
}
</style> 
 </head> 
 <body> 
  <div class="image-container"> 
   <img src="https://www.java2s.com/style/demo/Opera.png" width="200px" height="200px"> 
   <div class="image-caption">
     Lorem i 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials