![]() |
#16 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,064
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
IMHO there is no need for an id if the link just hits the TOP-o-file ![]() |
|
![]() |
![]() |
![]() |
#17 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,763
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
<p class="sectionbreak">Some text for the first paragraph after the section break</p> .sectionbreak { padding-top: 2em; text-indent: 0 } That's what works best for a screen be it eInk, a phone, or tablet. By using padding-top, you don't lose the section break space when it occurs at the bottom of the page. |
|
![]() |
![]() |
![]() |
#18 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Quote:
![]() I thank you all for your help. If I understand you all correctly, here's what I think I must do . . .
It would help to know what readers are the most popular. The Kindle is the most popular, right? That uses MOBI, I think. What EPUB readers are the most popular? Are they Google Play Books and iBooks? Must I really use longhand for all CSS? It'll quadruple the amount of code! Last edited by fluoresce; 05-01-2017 at 09:55 AM. |
|
![]() |
![]() |
![]() |
#19 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,064
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Is it worth the effort to make your book work on every possible device? OSFN (one size fits none) If you get fancy, you need to customize styles for those device outliers BTW many of the books in my Library have (prettified) stylesheets of under 300 lines. I use mostly shorthand for Margin. the others like Border I do longhand . Oh! I only do EPUB 2 for use on my ancient Astak and conversion to AAZW3 for my K4NT |
|
![]() |
![]() |
![]() |
#20 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Quote:
I've just gone through all of the images in my EPUB. There are 149 of them. Half of them do not have their height and width defined, so they look like this: <img alt="whatever" src="whatever.png"/> Do I have to add the width and height of every image, as I would if it were a website? |
|
![]() |
![]() |
![]() |
#21 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,763
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
As to the images, there are many different screen sizes including phones & tablets. You'd be best to use %. <img alt="whatever" src="whatever.png" height="50%"/> The problem is that without a Reader, you won't be seeing what someone with a Reader will see. So get one and test away but it has to be high resolution and a Kobo would be better than a Kindle since your source is ePub. I suggest the Kobo Aura H2O. |
|
![]() |
![]() |
![]() |
#22 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Quote:
I'm pretty sure that the images are not high resolution. I don't know about that kind of stuff. They're probably 72 PPI. In terms of pixels, they range from 300px to 600px. Does this mean that they will look terrible on high-res screens? ![]() I'm worried about my images now! For testing purposes, I only have a small Android tablet and my mobile phone, both with Google Play Books. My ebook is fitness-related. Most of the images are tables. I'm assuming that most of my readers will read the ebook on their phones. How exactly do you recommend that I code the images? At the moment, they look like this: Code:
<div class="centerimg"> <img src="whatever.png" alt="Whatever"/> </div> Code:
.centerimg { text-align: center; padding: 0; margin: 6pt 0 16pt 0; } I thank you for your guidance. |
|
![]() |
![]() |
![]() |
#23 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
I would try and stay away from using "height:xx%" as the height value is not reliable. It is supposed to refer to the height of the parent element, but what exactly is that height?? Is it the size of the div, the screen, the page, the file?? You can set the css for an image to have a certain width in %, but then tell it to have a maximum width to prevent overstretching. Then the height will scale as necessary to keep the proper aspect ratio - defining BOTH height and width isn't necessary. Here is an example: Code:
<div class="image1"><img alt="" src="../Images/img_1.jpg" /></div> <div class="image2"><img alt="" src="../Images/img_2.jpg" /></div> <div class="image3"><img alt="" src="../Images/img_3.jpg" /></div> etc. CSS div.image1 {margin: 2em auto; width:80%; max-width: 500px} /* actual width in pixels of img_1 */ div.image2 {margin: 2em auto; width:80%; max-width: 490px} /* actual width in pixels of img_2 */ div.image3 {margin: 2em auto; width:80%; max-width: 621px} /* actual width in pixels of img_3 */ IMHO, Marvin is the best eReader app on iOS, but it is not the widest used. The creator did a really good job at rendering ePubs the way they should be. Cheers, |
|
![]() |
![]() |
![]() |
#24 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,763
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If a % is not used, then you could have the images not properly displayed on screen. So yes, use % like I posted. But you'll have to test what % works. You can also use width="50%" as well to do image sizing. But given that you don't have a hi-resolution eInk device, It is highly suggested you either buy one or borrow one (if you can) because what you see on a phone or tablet is not the same as what you see on eInk in terms of images.
|
![]() |
![]() |
![]() |
#25 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Thanks, Turtle91 and JSWolf! Learning a lot from you guys.
Please tell me if I understand you correctly . . . Some hi-res e-readers stretch images to take up space, in which case low-res images can look terrible. We can fix this by doing something like the following: Code:
<img alt="" src="../Images/img_3.jpg" width="90%" style="max-width:600px"/> Is that correct? |
![]() |
![]() |
![]() |
#26 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
I need to check if all of the internal links are working in my EPUB. There are quite a few.
In Sigil, I can run a report. When I click on "Links", I can see lots of details about the internal and external links. There's a column called "Target exists?". Am I right in assuming that if a link is broken, it would say "No" here? Is that how you can identify a broken link? |
![]() |
![]() |
![]() |
#27 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,763
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
This is why I say to test it on different devices with different screen sizes including eInk. Viewing it on a tablet or phone is not the same as viewing it on eInk. So get yourself an eInk Reader (hi-res) and test away. |
|
![]() |
![]() |
![]() |
#28 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Sorry, JSWolf, do you mean like this?
Code:
<img alt="" src="../Images/img_3.jpg" width="90%" style="max-width:100%"/> |
![]() |
![]() |
![]() |
#29 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,763
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You can try code like that using ADE for PC or MAC. You can resize the ADE window to see the results of the code and decide what you might want to use for a %. I would have to test things to know what % number(s) to use.
|
![]() |
![]() |
![]() |
#30 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Quote:
Okay, this is what I have done. CSS Code:
img { max-width: 100%; height: auto; } Code:
<img src="whatever" alt=""/> Everything seems to be working well. The images are scaled up to their maximum size in pixels, after which they stop being scaled up. However, I've now encountered another problem! Many images are just tables that include lots of text. When these images are scaled down, they look very blurry on ADE for PC! Having done some research, I understand that this is not a CSS problem; rather, it's to do with the fact that text is difficult to be scaled down. Do you know how I could fix this problem? ![]() Last edited by fluoresce; 05-03-2017 at 08:05 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page Margin Best Practices epub->mobi | BKh | Conversion | 0 | 08-09-2012 12:11 PM |
TOC best practices (InDesign to ePUb) | virtual_ink | ePub | 3 | 07-03-2011 01:50 PM |
Free book (nook/Kindle) - The Truth About Branding Practices [Business Advice] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 05-09-2011 03:22 AM |
EPUB Math: Best Practices for Mathematics in Ebooks | Adjust | News | 0 | 08-23-2010 10:17 PM |
EPUB best practices guide | Bob Russell | ePub | 25 | 04-01-2008 08:36 AM |