Jinx
Jinx

Reputation: 867

Make text overflow to the left side with CSS

I have this main titles that have following CSS properties:

text-align:right;
padding-right:30px;
border-right: 3px solid #c7342d;
float:left;
width:300px;

Font of the titles is very large and there are long words that go over 300px in width. This causes some words to overflow, but they overflow to the right into the padding & border area instead to the left.

Is there a way to force text to overflow to the left?

Here are several examples just so that you understand what I'm after: (second image is how it should look) Example no.1

Example no.2

Example no.3

Upvotes: 2

Views: 1864

Answers (1)

federicot
federicot

Reputation: 12341

Try adding the following CSS rule to your title,

direction: rtl;

This will make it right-to-left and will thus invert the overflow direction.

Upvotes: 2

Related Questions