As the title states, I am not able to center my content vertically.
When I inspect the divs, I have this bit of empty space below my divs and I don't know where that is coming from.
Perhaps that's the problem, since when I go into the dev tool styles and put in <line-height: 3>
it centers.
I don't wish to hardcode things like this, and flex normally works, but I'm totally stumped here.
If you need to see anything else, please let me know!
.table-page-nav-wrapper {
display: flex;
justify-content: center;
align-items: center;
}
.arrow-btn {
text-align: center;
width: 50px;
height: 50px;
border-radius: 4px;
box-shadow: 0 5px 5px rgba(0,0,0,0.2);
}
.page-index-inner {
text-align: center;
width: 244px;
height: 50px;
border-radius: 4px;
box-shadow: 0 5px 5px rgba(0,0,0,0.2);
margin: 0px 20px;
}
<div class="table-page-nav-wrapper">
<div class="arrow-btn"><</div>
<div class="page-index-inner">Why won't I center correctly?</div>
<div class="arrow-btn">></div>
</div>