Thread: br clear
View Single Post
Old 01-23-2022, 08:49 PM   #4
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by Notjohn View Post
On the web, I'd simply use br clear=all, but that of course fails epubcheck,
This works and passes all tests.

I do this to keep a sequence of bio paragraphs with a portrait each separated:

<div class="nobreak">
<p class="noindent"><img class="mug" src="../Images/01kadek.jpg" alt="01kadek"/> KADEK KRISHNA ADIDHARMA, translator of Nukila Amal, is an author, curator, translator and environmental engineer. He is an independent voice from Bali who writes on art and environmental issues through the lenses of culture, ecology and history.<br class="cb"/></p>
</div>

.nobreak {break-inside: avoid; display: inline-block;}
br.cb {clear: both;}
img.mug{width:25%;float:left;margin-right:1em;margin-bottom:0.5em;}

The div is to try to stop pagebreaks in the middle. Doesn't always work in practice, some readers are pigheaded.

Last edited by AlanHK; 01-23-2022 at 11:58 PM.
AlanHK is offline   Reply With Quote