View Single Post
Old 01-06-2017, 08:25 PM   #5
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 527
Karma: 9529956
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by RobertJSawyer View Post
Code:
body {
  widows: 0;
  orphans: 0;
  text-align: left !important;
}
p {text-align: left}
and yet in a number of ebooks (not all) I'm still getting full justification, instead of left alignment.
Add "!important" to the "p" rule. "!important" only affects the order in which rules are selected from various stylesheets after specificity is checked. Any rule in the eBook that formats a "p" element as fully justified would be used, because your "p" rule is sooner in the cascade order, and your "body" rule has less specificity.

Basically, your "body" rule is only being applied to text that is inside a "body" element but not inside of any other element with styling, which is pretty unlikely.
nabsltd is offline   Reply With Quote