View Single Post
Old 10-15-2022, 09:53 AM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
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:
Originally Posted by Tex2002ans View Post
We agree on 99%, and only disagree on some minor differences (he says <div>, because "poetry isn't paragraphs"... and I still insist on <p>).
Lolz. Yup, div is more semantically correct, but I use <p> as well… it saves a micro-bit or two on file size, and it’s a little cleaner IMO.

I also tend to define a default style rather than putting a class on every line:

Code:
div.poetry {
  margin: 1em 0 1em 2em;
}

div.poetry p {
  margin: 0;
  padding-left: 3em;
  text-indent: -3em;
  text-align: left;
}

div.poetry p.indent {
  margin: 0;
  padding-left: 5em;
  text-indent: -3em;
  text-align: left;
}

div.poetry p.space {
  margin-top: 1em;
}
Code:
<div class="poetry">
  <p>line of poetry</p>
  <p class="indent">indented line of poetry</p>
  <p>line of poetry</p>

  <p class="space">line of poetry in new stanza</p>
  <p>line of poetry</p>
  <p>line of poetry</p>

  <p class="space">line of poetry in new stanza</p>
  <p>line of poetry</p>
  <p>line of poetry</p>
</div>
Obviously there are many ways to skin that cat!
Turtle91 is offline   Reply With Quote