You can set the direction of text from right to left using css direction property direction: rtl
:
.l {
text-align: left;
direction: rtl;
}
.r {
text-align: right;
}
p {
width: 150px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
border: solid 1px green;
}
111222333444555666777888999
111222333444555666777888999
direction
Set the direction CSS property to match the direction of the text: rtl
for languages written from right-to-left (like Hebrew or Arabic) text
and ltr for other scripts. This is typically done as part of the
document (e.g., using the dir attribute in HTML) rather than through
direct use of CSS.
References
MDN direction