Responsive Text Overlay on a image - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive Text Overlay on a image

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">
.class1 {<!--from  w  ww  .j  a v a  2s  .  c o  m-->
   position:absolute;
   height:397px;
   width:961px;
}

.class2 {
   position:absolute;
   height:397px;
   width:961px;
}

.class2 h1 {
   padding:100px;
}
</style> 
 </head> 
 <body> 
  <div> 
   <div class="class1"> 
    <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   </div> 
   <div class="class2"> 
    <h1>Lorem ipsum dolor sit a</h1> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials