css text-indent equivalent on the right side

Simple solution is to apply a "before" CSS style to your text element which negates all side effects of direction: rtl;

&:before {
      content: ' ';
      width: 100px;
      float: right;
      height: 5px;
} 

What I did and worked for me was this:

text-indent: 20px;
padding-right: 40px;

Do the following

text-indent: 60px;
direction: rtl;
text-align: left;

f.ardelian pointed out: Punctuation will appear at the beginning of the line so abc. will appear .abc


There is none, unfortunately there is no text outdent in css, hower, you could use text direction direction:rtl; for some short texts, in that way indent will appear on the other side.

Tags:

Css