View Single Post
Old 08-03-2019, 04:54 PM   #1926
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by lumpynose View Post
Waah! I need it in order to override some CSS that has higher precedence. This seemed like a nice generic way for all books.

I can't remember what the book was using that made it hard to override. Are there other ways of overriding besides !important?
!important seems to work OK as part of the firmware's default override CSS files for epub and kepub. So, if you're using the kobopatch system, you might be able to do it with a customised patch. For example, you could try customising the patch called 'Un-Force user text-align in div,p tags in KePubs' if you wanted to force alignment in all kepubs.

The default kepub override CSS is:
Code:
div, p { text-align: %1 !important; }
Changing that to:
Code:
div, p {text-align: left !important;}
or some other variation of your choice. (Note: You must keep the before/after string lengths the same.)

However, be aware that this would stop the alignment buttons in the Kobo's [Aa] menu working for kepubs. Only experimenting will tell you whether it actually does what you want.
jackie_w is offline   Reply With Quote