I have a b-button which is basically a router-link/a tag which contents i'd like to center. I want the text to be underneath my font awesome icon and both of them should be horizontally and vertically centered but nothing seems to work.
<b-button variant="primary" class="main-navigation-button primary-custom-color"
:to="{name: 'companyCarList'}">
<i class="fas fa-car fa-4x icon-full-width"></i>
Text
</b-button>
Style of my button:
.main-navigation-button {
border: solid 1px transparent;
border-radius: 1rem;
box-shadow: 3px 3px 5px #ccc;
font-size: 2vmax;
margin-bottom: 20px;
width: 15vw;
height: 15vw;
min-width: 150px;
min-height: 150px;
}
.main-navigation-button primary-custom-color {
display:flex;
flex-direction:column;
justify-content: center;
align-items:center
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.