| 
			
			 | 
		#1 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	
	
		
		
			
			 
				
				E-bokk viewer: Image+text+page-break-inside:avoid = issue
			 
			
			
			Hi. 
		
	
		
		
			I faced the issue with breaking between image and text inside div which has page-break-inside:avoid property. Could it be somehow solved or fixed? Thank you. div: Code: 
	<div class="Figure" id="Ferrier-ch001-fig012"> <p class="fig-img"><img src="Image00018.jpg" alt="Ferrier7e-ch001-image012"/></p> <p class="FigTitle"><span class="fignum">Figure*1.12</span> The Henderson-Hasselbalch equation is used to predict: (A) changes in pH as the concentrations of bicarbonate (HCO<sub>3</sub><sup>−</sup>) or carbon dioxide (CO<sub>2</sub>) are altered and (B) the ionic forms of drugs.</p> </div> Code: 
	div.Figure
{
-webkit-column-break-inside: avoid !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
margin: 1.5em 0em 1.5em 0em;
}
Code: 
	p.fig-img
{
text-align:center;
margin: 10px;
}
Code: 
	p.FigTitle
{
text-align:justify;
font-size: inherit;
margin:0em 0em 0em 0em;
padding:0.15em 0em 0em 0em;
text-indent:0em;
border-top:2px solid black;
}
 | 
| 
		 | 
	
	
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Bibliophagist 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,175 
				Karma: 174315444 
				Join Date: Jul 2010 
				Location: Vancouver 
				
				
				Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Looking at your screenshot, your image is so tall, there is no room for the text below it on the same page. About the only way that would fit on the page you are using is if you used an svg wrapper to automatically resize to the page size.  However, svg mixing text and images can be a PITA. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			In the MobileRead library, you might want to take a look at Claudio Bombarnac by Julio Verne (uploaded by jbacelar) I remember looking at it a few years back as he used a mix of text and image in an svg wrapper for his title page. Last edited by DNSB; 04-10-2020 at 08:25 PM.  | 
| 
		 | 
	
	
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Yes, the image is rather tall, but if I shrink viewer window it fits image and text together. Is it some way to make viewer avoid breaking inside div without shrinking its window?  | 
|
| 
		 | 
	
	
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Bibliophagist 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,175 
				Karma: 174315444 
				Join Date: Jul 2010 
				Location: Vancouver 
				
				
				Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			You might try specifying the amount of the div the image is allowed to use.  Currently, I can't see where you have specified a size for any of the elements.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	p.fig-img
{
max-height: 90% !important;
text-align:center;
margin: 10px;
}
 
		 | 
|
| 
		 | 
	
	
| 
			
			 | 
		#6 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			break-inside:avoid is an advisory property, you cannot enforce it. Wether or not it is respected in any given situation depends on the browsers layout algorithms.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
| 
			
			 | 
		#7 | |
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Can I clarify the meaning of the term "browser layout algorithm" - did you mean "epub processing engine" without referring to any browser (Firefox, Edge, Chrome, etc.)? Is it possible to fix Calibre engine to process above mentioned issue properly? E.g. Calibre-Web displays same Epub without issues (see screenshot) in any browser but I cannot say the same about Calibre E-book viewer or Calibre Content server.  | 
|
| 
		 | 
	
	
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 333 
				Karma: 2228060 
				Join Date: Dec 2013 
				Location: LaVernia, Texas 
				
				
				Device: kindle epub readers on android 
				
				
				 | 
	
	
	
		
		
			
			 
				
				long skinny image with caption
			 
			
			
			Here is one of many solutions for the problem of long/skinny image with caption. Best regards, Pop
		 
		
	
		
		
			 | 
| 
		 | 
	
	
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	|
| 
		 | 
	
	
| 
			
			 | 
		#10 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			The calibre engine is a browser, chromium to be precise.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	|
| 
		 | 
	
	
| 
			
			 | 
		#12 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			checking them in a regular browser is meaningless. In the book content is split using CSS 3 columns, into pages, with margins. You would need to replicate that in the browser at a minimum to make a decent comparison.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
| 
			
			 | 
		#13 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I get it. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Could it be any hope to fix processing content as it done now in Calibre-Web?  | 
| 
		 | 
	
	
| 
			
			 | 
		#14 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 333 
				Karma: 2228060 
				Join Date: Dec 2013 
				Location: LaVernia, Texas 
				
				
				Device: kindle epub readers on android 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			"there so many such tall images in the book that I'll need more time to spend as editor than as reader"  
		
	
		
		
		
		
		
		
		
		
		
		
	
	Sorry, I thought you were looking for advice on how to EDIT the book so that long skinny images would stay with caption. If you are just looking for a way to view the book better without editing it, I suggest using the multicolumn Ctrl-[ and Ctrl-] feature of the calibre reader. Images will be followed by caption in next column automatically in a correct alignment. You can zoom the image in calibre's viewer. Best regards, Pop  | 
| 
		 | 
	
	
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 36 
				Karma: 10 
				Join Date: Apr 2020 
				
				
				
				Device: PC 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 ![]() For me and, IMHO, for many other ones more comfortable max 2 column to read such books, hence it would be great if this issue would be fixed in Calibre E-book reader.  | 
|
| 
		 | 
	
	
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Does page-break-inside:avoid work in azw3 files? | AlexBell | Workshop | 4 | 04-21-2015 01:52 AM | 
| Keeping text together (block vs. page-break-inside:avoid) | Psymon | ePub | 2 | 10-12-2014 10:56 AM | 
| page-break-after:avoid on iBooks | Oxford-eBooks | Apple Devices | 1 | 08-12-2013 12:40 PM | 
| Page-Break-Inside: Avoid - Solution or Hack? | sab1234 | Kindle Formats | 3 | 01-17-2013 05:10 PM | 
| Page-break-inside:avoid and mobi | AlexBell | Kindle Formats | 3 | 06-01-2011 07:03 AM |