View Single Post
Old 01-15-2026, 12:03 PM   #19
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 81,617
Karma: 150265991
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by icearch View Post
I think class really doesn't take that much space, so no harm to use when needed. If I want to not use this feature, there would just be more hassle I think.

In fact, just to my own preference, even most p in my book needs 2em indent, I still use class to let them indent, just because i need some p to be not affected.
The p you don't want a 2em indent, you just put in what sort of indent you want in the class. As you can see, the first paragraph after the </h2> is not indented. The second paragraph is indented. Also, if you use the class noindent, you'll do away with the indent. So your main paragraph style can be without a class.

HTML code
Code:
<h2>CHAPTER 1</h2>
<p>There were four black and whites already at the 7-Eleven when I arrived. Several people had gathered in the parking lot behind the yellow police tape, huddling close for protection against the freezing Chicago rain.</p>
<p>They weren’t there for Slurpees.</p>
CSS code
Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  widows: 1;
  orphans: 1;
  text-indent: 1.2em;
}
h2 + p, .noindent {
  text-indent: 0;
}
JSWolf is offline   Reply With Quote