I'm using stickyfill to stickify one of my columns in a two column design. I need my parent to fill vertically without declaring a height. stickyfill detects browsers (firefox, safari) that support position:sticky; and lets those browsers take over.
I'm used to simply setting the parent's overflow to hidden but in this case, it breaks position:sticky; from working.
My solution is to set the parent's display property to table. This works from what I've tested, but I'm wondering if this is a bad idea or if there's a better way to achieve my goal.
Example: JSFiddle
CSS:
.wrapper {
overflow: visible;
display: table;
width: 400px;
}
.left {
float: left;
width: 60%;
height: 1280px;
background-color: #EEE;
}
.right {
overflow: hidden;
position: -webkit-sticky;
position: sticky;
top: 0;
}
HTML:
<div class="wrapper">
<div class="left">Content</div>
<div class="right">Sticky</div>
</div>