I am attempting to create a scoreboard in the following format:
0 - 0
Home - Away
The issue I am facing is that if the length of the Home team's name is longer, it pushes the dash (-) further. I want the dash to be aligned with the one in the score above. My HTML structure looks something like this:
<div className="score">
<span>0</span>-<span>0</span>
</div>
<div className="team">
<span>{homeName}</span>-<span>{awayName}</span>
</div>
I have tried using the direction
property on the span with rtl
. I have also experimented with setting text-align
to center
and using the position
property with fixed values, but it did not work. I am not sure if I am on the right track or not. Any assistance would be greatly appreciated.