![]() |
#1 |
Miskatonic U. Class of 97
![]() Posts: 20
Karma: 10
Join Date: Apr 2015
Location: Ethersphere
Device: iPad, Kindle, Nook,
|
Poetry problem again?!
Well here is my new dilemma with poetry...
I have a chapter which has a centered, italic epigraph at the top of the main page; however, that epigraph also has a poem written in stanza form in it. Is there a way to wrap the stanza that it retains the align left, but is also centered within the rest of the epigraph? Been trying this: <div class="epicenter"> <p class="verse">"The Spirit of the Lord is upon me,</p> <p class="verse2">because he has anointed me</p> <p class="verse3">to bring good news to the poor.</p> </div> div.epicenter { clear: both; float: center; font-style : italic; margin-top: 1em; line-height: 1.2em; display: inline-block; } So far I'm stuck. Anyone have a clue how I can do this, or if I simply cannot let me know also. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
float: center ???? right or left or none
text-align: center |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Yes, there are several ways to do what you want. One aproximation could be:
1. In the .css stylesheet: Code:
p { font-size: 1em; text-indent: 1.2em; text-align: justify; } div.epigraph { text-indent: 0; text-align: center; font-style: italic; font-weight: bold; font-size: 1.1em; } div.epigraph div.stanza { width: 60%; /* You can play here with the width */ margin: 1em 20%; /* Left and right margins are linked with the width you set */ padding: 0.5em; /* This is not necessary, only if you want a border around the stanza */ text-indent: 0; text-align: left; font-size: 0.8em; font-weight: normal; border: 1px solid; /* This is not necessary */ } div.stanza p { margin: 0; } Code:
<div class="epigraph"> This is the title <div class="stanza"> <p>"The Spirit of the Lord is upon me,</p> <p>because he has anointed me</p> <p>to bring good news to the poor.</p> </div> </div> <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.</p> Below you can check the respective epub. Regards Rubén |
![]() |
![]() |
![]() |
#4 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Has nothing to with Sigil. This is a plain epub(xhtm/css question. Damn, why are those questions always put into this forum and in addition not moved by moderators?
|
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Moderator Notice
moved out of Sigil. This issue is not caused BY Sigil |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
One thing to watch out for is the length of your stanza lines. If they are too long for the display widh you will get word-wrapping that makes the lines look funny:
eg: There once was a man from Nantucket Who kept all his cash in a bucket. But his daughter, named Nan, Ran away with a man And as for the bucket, Nantucket. Cheers, |
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
There once was a man from Nantucket Who kept all his cash in a bucket. But his daughter, named Nan, Ran away with a man And as for the bucket, Nantucket. |
|
![]() |
![]() |
![]() |
#8 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Is there any way to reproduce the layout usually used in printed poetry, which is to align wrapping lines with the end of the initial line? I can't think of a way to reproduce that in an ePub (other than to use a fixed page layout, of course).
|
![]() |
![]() |
![]() |
#9 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Not that I know. I asked for this a long time ago (almost 6 years): http://www.daisy.org/epub/?q=issues/...-option-poetry
|
![]() |
![]() |
![]() |
#10 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Yes, because it's not even right-justification in the usual sense of the word. The wrapped line is right justified with respect to the end of the left-justified initial line, not with respect to the right margin.
|
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
With css2, you can't get what you want. But with css3 and epub3 (supported by the new ADE 4.x), yes, you can ![]() Code:
.stanza { text-align: left; /* or text-align: justify; */ text-align-last: right; } Regards Rubén |
|
![]() |
![]() |
![]() |
#12 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
It wouldn't work for more than two lines (what would be the desired behaviour here?), and according to http://www.w3schools.com/cssref/css3...align-last.asp "text-align-last" only works with "text-align: justify", although firefox doesn't seem to care. In addition, the last line is aligned with the "container", not with the actual previous line.
Nevertheless, it's better than nothing. Still no way to add the bracket before the last line, I guess. |
![]() |
![]() |
![]() |
#13 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#14 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
w3schools.com gives an example with more than two lines: http://www.w3schools.com/cssref/tryi...ext-align-last And you're right; in theory, "text-align" should be "justify" in order that "text-align-last" works. But as you say, it also works with "text-align: left", at least on Firefox. Quote:
Regards |
||
![]() |
![]() |
![]() |
#15 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Poetry Verses Alignment Problem | mtrahan | ePub | 23 | 04-05-2015 10:18 PM |
poetry | cian | ePub | 2 | 01-23-2011 02:56 PM |
Got POETRY? | Dr. Drib | Writers' Corner | 36 | 04-02-2009 11:18 AM |
Formatting Poetry - A Problem | Patricia | Sony Reader | 8 | 08-21-2007 02:33 PM |