I am aware there are some similar questions but nothing that is helping me bascially what I am trying to create is a table like layout the has a sticky header and a sticky left column
So far I have created this
.container {
height: 200px;
width: 100%;
overflow: scroll;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
}
.row {
min-width: 100%;
height: 70px;
display: flex;
align-items: flex-start;
justify-content: flex-start;
}
.row.sticky {
top: 0;
position: sticky;
position: -webkit-sticky;
background: red;
z-index: 10;
min-width: 100%;
}
.row__item {
min-width: 173px;
height: 70px;
border: 1px solid black;
}
.row__item.sticky {
left: 0;
position: -webkit-sticky;
position: sticky;
background: green
}
<div class="container">
<div class="row sticky">
<div class="row__item sticky">1</div>
<div class="row__item">2</div>
<div class="row__item">3</div>
<div class="row__item">4</div>
<div class="row__item">5</div>
<div class="row__item">6</div>
<div class="row__item">7</div>
<div class="row__item">8</div>
<div class="row__item">9</div>
</div>
<div class="row">
<div class="row__item sticky">1</div>
<div class="row__item">2</div>
<div class="row__item">3</div>
<div class="row__item">4</div>
<div class="row__item">5</div>
<div class="row__item">6</div>
<div class="row__item">7</div>
<div class="row__item">8</div>
<div class="row__item">9</div>
</div>
<div class="row">
<div class="row__item sticky">1</div>
<div class="row__item">2</div>
<div class="row__item">3</div>
<div class="row__item">4</div>
<div class="row__item">5</div>
<div class="row__item">6</div>
<div class="row__item">7</div>
<div class="row__item">8</div>
<div class="row__item">9</div>
</div>
</div>
Now this works pretty well except for on IOS Safari where the top left sticky item is jittery.. I was wondering is this the best way to accomplish this, if not what else can I do? If it is how can I solve the jittering for Safari on IOS??
Does anyone have any other solutions?