View Single Post
Old Yesterday, 12:36 PM   #40
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,919
Karma: 9553607
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by ElMiko View Post
Quick question (hopefully): do you know why when using your classes if I do <div class="center"><div class="block"> the bottom margin disappears when the text has to flow onto a second page (see image4 attached)?
The bottom margin disappears because with my code, the margin is set to the unique and main div (<div class="center block">), so that element has a bottom margin of 1em. But when you use:

Code:
<div class="center"> /* Here there is no margin at all */
   <div class="block"> /* Here I suppose you have a bottom margin */
...
...
   </div> /* After that, a bottom margin of 1em */
</div> /* After that, no bottom margin */
So if all the code is in the same page, the margin of .block works, but whe the code is splitted to the next page, the bottom margin is absorbed (according to your method). Use padding instead of margin if you want to use two <div>

Quote:
Also, I tested it with class="center block" and class="block center" and it appears to be agnostic to order. Is that right?
In this case, yes, is right.

Quote:
EDIT: Re: ADE, of course not. What else is new? But also we're already on 4.5.something... when can we collectively forget about that trash application? Surely, those old nooks and kobos are on their last legs battery-wise....
The code works on ADE 4.5, but you need to employ the epub3 protocol in your epub.
RbnJrg is offline   Reply With Quote