Quote:
Originally Posted by Jellby
What mzmm means is that you could change the CSS, so that instead of ".p1" you have "div.poetry p". That way you don't have to apply any specific style to poetry lines, as long as they are enclosed in a "<div class="poetry">" block, as the "div.poetry p" selector applies to any <p> inside such a block, with or without class.
By the way, I wouldn't recommend using <p> for poetry lines because they are in fact not paragraphs. One could argue that stanzas are sort of paragraphs, but not lines. I'd use <div> or <span> (with display:block). The latter is closer to the real semantics, the former has the advantage of displaying nicely even with CSS disabled (and the disadvantage that you cannot use <p> for stanzas with that). My usual setup:
Code:
<div class="poetry">
<div class="stanza">
<div class="line">verse line</div>
<div class="line2">verse line</div>
<div class="line">verse line</div>
<div class="line2">verse line</div>
</div>
<div class="stanza">
<div class="line">verse line</div>
<div class="line2">verse line</div>
<div class="line">verse line</div>
<div class="line2">verse line</div>
</div>
</div>
("line" and "line2" have different left margins, to create the desired indent patterns, when needed.)
A bit too verbose, and one could dispose of the class="line" through CSS, but it's usually quite easy to apply this formatting to all kinds of poetry fragments.
|
That seems conclusive, and your explanation is very instructive. Thanks a lot!