How Do I Perfectly Center a Float Element in Between Two Floated Elements?
I am finding it difficult to center a text in between two other texts.
How do I perfectly center the
.center as shown in the correctly marked image?
One approach would be to set the
display of the middle element to
inline-block and then use
text-align: center on the parent element for horizontal centering:
Alternatively, you could avoid floating the elements, and use the following method instead: