Aligning a text in a div
is done via text-align
. It normally works fine:
<div style="text-align:right;border:1px solid red">
this goes to the right
</div>
I have a piece of code (in the middle of a large HTML generated with the help of vue.js) where the alignment is not applied. I forced a width of a div
and wanted the text inside it to be aligned to the right:
There is ample space for the 8:00
to move to the right but it stays centered. The CSS stack does not show anything special for this element:
What could be the reason for this alignment (or lack of)?
Note: I am not including the whole HTML/SCSS code as there is quite a lot of it - hopefully the CSS stack is enough?