View Single Post
Old 03-20-2018, 05:36 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by davidfor View Post
Looking at that, my first thought*, is that someone is playing games with the left margin and have ended up with a negative margin in the CSS. Or maybe a negative text-indent. It looks like a case where the renderer is doing exactly what it is told to do, but what it is being told to do doesn't work properly.
Yep. I'm thinking they used a negative indent, but forgot to set the left margin as an equal and opposite.

Example Code:

Spoiler:
Code:
<body>
  <p class="noindent">This is a sentence with no indent.</p>

  <p class="correct">This is a sentence with a proper negative indent.</p>

  <p class="wrong">This is a sentence with a wrong negative indent.</p>
</body>


CSS:

Spoiler:
Code:
.noindent {
	text-indent: 0;
}

.correct {
	text-indent: -2em;
	margin-left: 2em;
}

.wrong {
	text-indent: -2em;
	margin-left: 0;
}


Click image for larger version

Name:	NegativeIndentExample.png
Views:	191
Size:	11.0 KB
ID:	162930

Seems like it's just the case of a poorly formatted book.

Only way to correct it is to open it up yourself and fix the CSS, or to contact the author/publisher and let them know about the formatting error.
Tex2002ans is offline   Reply With Quote