CSS position absolute full width problem - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL

Description

CSS position absolute full width problem

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">
div {<!--from   w  w  w.ja  v a2 s. c  o  m-->
   background-color:Chartreuse;
}

#wrap {
   margin:0 auto;
   width:100%;
   min-width:761px;
   max-width:1004px;
   overflow:hidden;
   height:201px;
}

#header {
   width:100%;
   float:left;
   padding-top:19px;
   margin-bottom:30px;
   height:100px;
}

#site_nav_global_primary {
   position:absolute;
   top:0;
   left:0;
   right:0;
   background-color:yellow;
}
</style> 
 </head> 
 <body> 
  <div id="wrap"> 
   <div id="header"> 
    <dl id="site_nav_global_primary"> 
     <dt>
       Lorem 
     </dt> 
    </dl> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials