<section class="parent">
<div class="fixed-child-content">
<div class="inner">
This is position fixed content.
</div>
</div>
</section>
.parent {
max-width: 300px;
width: 100%;
margin: 0 auto;
background: #ccc;
height: 100vh;
}
.fixed-child-content {
position: fixed;
background: #000;
color: #fff;
bottom: 0;
max-width: inherit;
width: 100%;
}
.inner {
padding: 20px;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.