0👍
✅
Styling you need:
.sidebar {
display: grid;
position: fixed;
grid-template-columns: repeat(10, 1 fr);
grid-template-rows: repeat(10, 1 fr);
grid-column: 1;
width: 16.8vw;
height: 100%;
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.3);
background: #26292c;
z-index: 1; /* Stay on top */
top: 0; /* Stay at the top */
left: 0;
}
.patient-name{
font-size: 16px;
color: #ffffff;
grid-column: 3/15;
grid-row: 1/2;
}
.patient-date{
font-size: 14px;
color: #98acc1;
grid-column: 3/15;
grid-row: 2/3;
}
.line{
background-color: #424a51;
width: 100%;
height: 1px;
grid-column: 1/16;
grid-row: 5;
}
.dots{
justify-self: center;
font-size: 16px;
align-self: center;
grid-column: 14/15;
grid-row: 1/2;
color: #ffffff;
}
.sidebar-last-three{
display: grid;
}
.patient-entry{
display: grid;
grid-column: auto;
grid-row: auto;
}
I’ve moved your example to codepen.
Try if this works for you.
Here is working example:
0👍
hope this might help you.
<style>
.sidebar-last-three{
display: grid;
}
.patient-entry{
display: grid;
grid-column: auto;
grid-row: auto;
}
</style>
<div class="sidebar-last-three" v-for="patient in this.lastThree">
<div class="patient-entry">
<span class="patient-name">one on top of the one</span>
<span class="patient-date">MM/DD/YY</span>
<span class="dots">...</span>
<span class="line"></span>
</div>
<div class="patient-entry">
<span class="patient-name">one on top of the two</span>
<span class="patient-date">MM/DD/YY</span>
<span class="dots">...</span>
<span class="line"></span>
</div>
<div class="patient-entry">
<span class="patient-name">one on top of the three</span>
<span class="patient-date">MM/DD/YY</span>
<span class="dots">...</span>
<span class="line"></span>
</div>
</div>
Source:stackexchange.com