View Single Post
Old 09-14-2026, 09:19 PM   #80
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: 84,925
Karma: 153791427
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 jackie_w View Post
You may know this already, but just in case you don't...

For kepubs Nickel uses this as the default override CSS when you change "Justification" in the [Aa] menu:
Code:
div, p { text-align: %1 !important; }
where %1 is the placeholder for your selected Justification setting. It's a bit of a blunt instrument. This is why poorly designed books which use <p> or <div> tags for the headings markup (rather than the proper <h1>, <h2> etc tags) display badly when you choose something other than "Off" as the Justification setting. It's not just headings though. Centred scenebreaks (e.g. <div class="break">***</div>) are much more likely to be forced to the left because they almost always use a <p> or <div> tag.

If you're a Kobopatch user, one of the oldest patches for libnickel.so.1.0.0, Un-Force user text-align in div,p tags in KePubs, lets you change the override to:
Code:
body { text-align: %1 !important; }
i.e. a less severe override. This matches what default Nickel does for standard epubs in the Adobe renderer.

ETA: For the sake of clarity I'm only talking about fw 4.xx. I've no idea whether fw 5.xx has changed many previously "well-known facts".
If you use !important for classes that have center used with div or p, will center work in you justify via the Aa menu?
JSWolf is offline   Reply With Quote