columns need to be the whole height of the row but the content (text) still needs to be vertically centered.
<div class="row fixed-bottom mobile-navbar align-items-center">
<router-link to="/" class="col h-100">Home</router-link>
<router-link to="/scan" class="col h-100">Scan</router-link>
<router-link to="/account" class="col h-100">Account</router-link>
</div>
how do I do this?
I’ve tried to place spans inside the a elements and use py-auto, but this doesn’t seem to do the trick.
2
Answers
I fixed the issue: I had a class on my row called, mobile-navbar that gave a fixed height on the element, making it annoying to center the children. I removed the fixed height and let the children decide the height of the parent by using padding leaving them in the center vertically.
h-100 takes the 100% size of the object it is in, so it cannot be centered because it is 100% vertical.
Delete the h-100s and give the container the following css or classes.
must be:
alternative: