View Single Post
Old 10-14-2022, 09:14 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,940
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by bookman156 View Post
I was annoyed that long lines in poems, when they broke, would look like a new line, I was using br tags.

Then it dawned on me how to get the broken bit to indent. Just do this:

Code:
p.poem {
    text-indent: -1em;
    margin-left: 1em;
}
Code:
<p class="poem">This is a poetry line</p>
<p class="poem">This is a long long long poetry line</p>
<p class="poem">This is an long long even longer long poetry line</p>
Reminds me of the CSS I've been using for quite a while to fake a list by using a hanging indent.

Code:
.fakelist {
  display: block;
  margin-bottom: 0.5em;
  margin-left: 2.5em;
  margin-right: 1.25em;
  margin-top: 0.5em;
  text-align: left;
  text-indent: -1.25em;
}
DNSB is online now   Reply With Quote