html - Preventing text from splitting over two pages -


this html @ end of ebook. when converting html mobi, preview ebook on kindle, above text @ end splitted on 2 pages in ebook. last page, want stop text splitting on pages. think should add around text code page-break-before:avoid or page-break-after:avoid property. not sure, 1 suitable use in case, page-break-after:avoid or page-break-before:avoid?

<hr/> <div> <font size=-1>lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua.</font> </div> </body>  </html> 

for example, should use sample, or page-break-before:avoid?

<div style="page-break-after:avoid"></div> <hr/> <div> <font size=-1>lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua.</font> </div> <div style="page-break-after:avoid"></div> </body>  </html> 

you should using instead:

page-break-inside: avoid; 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -