Quote:
Originally Posted by AlexBell
I know how to get long lines of left aligned poetry to indent after the line break. But I am doing some poems for an author who has the text in some of her poems right aligned, and some of those lines are longer than the width of the screen. The lines break of course, but the text after the break is flush with the right margin.
Is there a way to make the text after the break indented say 2em from the right margin? Can anyone point me to poems in ePub format in which the lines are long and indented from the right margin after the break? Or tell me how to do it?
|
Hi Alex;
You can do that by using the property "direction". The issue is that not all ereader can support it

(you can't use it for example in ADE 3.x). In your css stylesheet, write the following:
Code:
.right_aligned {
direction: rtl;
text-indent: 3em; /* or whatever indent you wish */
text-align: right;
margin: 0em;
}
and in your .xhtml file do the following:
Code:
<div class="right_aligned">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula. Praesent orci dui, pulvinar id convallis a, faucibus non mauris.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula. Praesent orci dui, pulvinar id convallis a, faucibus non mauris.</p>
</div>
This is how it looks in Sigil:
Regards
Rubén