Nested container appearing inline even if nest has overflow:hidden - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

Nested container appearing inline even if nest has overflow:hidden

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">
.container {<!--from w w w.jav a2s .c o  m-->
   display:inline-block;
   height:100px;
   background-color:Chartreuse;
   overflow:hidden;
}

.content {
   width:97px;
   height:97px;
   border:3px solid yellow;
   float:left;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <span class="content" style="background-color: #CC0033;">Lor</span> 
   <span class="content" style="background-color: #FF6600;">Lor</span> 
  </div>  
 </body>
</html>

Related Tutorials