I am working on a modal album that displays images of various sizes. My issue is with styling the navigation arrows to appear in the center of the page, regardless of the image size. I have included my code below:
<div class="row img-box">
<div class="col-1">
<span @click="nextImg(-1)" class="nav-arrow">❮</span>
</div>
<div class="col-9">
<h1>Modal content goes here</h1>
<img class="img-fluid modal-img" :src=" getImgUrl(currentMediaUrl)">
</div>
<div class="col-1">
<span @click="nextImg(1)" class="nav-arrow">❯</span>
</div>
</div>
Below is the relevant CSS:
.modal-img {
max-height: 1080px;
}
.img-box {
display: flex;
align-items:center;
}
.nav-arrow {
font-size: 3em;
position: absolute;
top: 50%;
}
Despite my efforts, I have been unable to achieve the desired effect through CSS adjustments. Therefore, I am seeking help with this issue.