How can I center align 3 buttons on a line using CSS and HTML?
This is what I have tried so far:
1/ CSS :
.center-buttons {
display: flex;
justify-content: center;
}
.button {
margin: 0 10px;
}
2/ HTML:
<div class="row">
<div class="col-12 ">
<div class="center-buttons">
<button class="button" style="background-color: #1da1f2">Twitter</button>
<button class="button" style="background-color: #3B5998">Facebook</button>
<button class="button" style="background-color: #0084ff">Messenger</button>
</div>
</div>
</div>
The current result shows the 3 buttons in the middle but not perfectly aligned.
What I am aiming for:
I would like all 3 buttons to be vertically centered with the line.
Any suggestions or feedback would be greatly appreciated.
**** EDIT *****
I will update the results based on suggestions here
1/ From @Gerard