Overriding overflow: hidden vs visible - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

Overriding overflow: hidden vs visible

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">
#parent {<!--  w ww. j a  v  a 2s . c  om-->
   position:relative;
   height:201px;
   margin:51px;
   border:2px dotted Chartreuse;
}

.container {
   position:absolute;
   top:0;
   left:0;
   bottom:0;
   right:0;
}

.container div {
   position:absolute;
   height:100px;
   width:100px;
}

#hidden {
   overflow:hidden;
}

#visible {
   overflow:visible;
}

#hidden div {
   border:3px solid yellow;
   left:-26px;
   top:-11px;
}

#visible div {
   border:3px solid blue;
   bottom:-51px;
   left:-26px;
}
</style> 
 </head> 
 <body> 
  <div id="parent"> 
   <div class="container" id="hidden"> 
    <div></div> 
   </div> 
   <div class="container" id="visible"> 
    <div></div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials