View Single Post
Old 07-05-2025, 06:39 PM   #5
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 72
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by RbnJrg View Post
If you need a special margin for a particular <p>, then employ <div> or <span> and this last one with the property "display: block". Or employ padding for those p tags who needs margins; it's not the same but, depending on the layout of your epub it could work.
This could be a workaround for some special cases, but since we wanna design the whole ebook with lots of paragraphs having margins, it just seems odd to replace tons of p-tags with semantically incorrect divs. Also, if a reader is that stubborn on one of the most basic CSS features, it might just not be the reader of our choice

Quote:
Originally Posted by RbnJrg View Post
Also if you want to try, could use "-webkit-margin-before:3em;" and/or "-webkit-margin-after:3em".
Thanks for the tip, I didn't know about that property - seems to be one of the more ebook targeting ones. However, I've tried "-webkit-margin-before: 3em !important;" and its modern variation "margin-block-start: 3em !important;" but unfortunately without any success.

I will try to contact PocketBook (again) and tell them friendly to fix their bug - although I think they would prefer to stay in the mindset that this is a feature.

Quote:
Originally Posted by Moonbase59 View Post
In general, it’s never a good idea to target a specific reader. EPUB is supposed to be a reflowing format that should work on all readers equally good.
You should be right, but unfortunately the creators of the reader software don't agree with you. So the only way to have an ebook which doesn't look like crap is to make a minimum working base version which at least shows all the text and images, no matter how ugly, and then pamper it bit by bit for the target readers you wanna support. It's just like it was years ago with all the many browsers, at least we don't need to take the IE with special targeting hacks any more into account.

Quote:
Originally Posted by JSWolf View Post
Or just use RMSDK to view the ePub as that works for margin on a p tag.
That is the framework to build your own ebook reader, right? Well, this would definitely be a solution for a big publishing company, but we are just a bunch of normal people who wanna provide ebooks for our community, so all the challenges and difficulties which come with that (ie. releasing apps on the Apple app store) are not worth the effort. But thanks for the tip anyways.
Slevin#7 is offline   Reply With Quote