I have Text partially overlay Image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

I have Text partially overlay 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">
#wrapper {<!--  w  w  w  . j a va2 s .c  o  m-->
   display:flex;
   justify-content:center;
}

#parent {
   width:551px;
   height:344px;
   background-image:url('https://www.java2s.com/style/demo/Google-Chrome.png');
   background-size:contain;
}

#child {
   position:relative;
   top:51%;
   right:7%;
}
</style> 
 </head> 
 <body> 
  <div id="wrapper"> 
   <div id="parent"> 
    <h1 id="child">Lorem ipsum dolor s<br>Lor</h1> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials