Position as browser resizes - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Position as browser resizes

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">
#banner {<!--  ww  w.  java2s.  c o  m-->
   background-color:Chartreuse;
   height:251px;
}

#overlay {
   background-color:yellow;
   position:absolute;
   top:201px;
   left:61px;
   right:41px;
}
</style> 
 </head> 
 <body> 
  <div id="banner">
    Lorem ipsum dolor 
   <div id="overlay">
     Lorem ipsum dolor 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials