Position Absolute Clipped
When I have a position absolute inside of my application, it gets clipped by its parent container's height.
by incutonez
HTML
<div id="app">
<div class="container">
<div class="content">
Content 1
</div>
<div class="absolute">
<div class="child">
Should Scroll as Content but show over parent's height
</div>
</div>
</div>
</div>
CSS
#app {
position: relative;
}
.container {
height: 100px;
/* If I take this off, I get the desired behavior */
overflow: auto;
position: relative;
}
.content {
height: 1000px;
width: 100%;
color: white;
background-color: darkblue;
}
.absolute {
position: absolute;
z-index: 10;
top: 20px;
left: 0;
width: 300px;
height: auto;
overflow: visible;
background-color: black;
color: white;
}
.child {
height: 200px;
}
body, html {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
overflow: auto;
}