View Single Post
Old 09-15-2024, 12:46 PM   #19
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,361
Karma: 20212223
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:
Originally Posted by JSWolf View Post
If this is for an eBook for sale, then you have to use what works for ePub2 and ePub3.
Not necessarily, Jon. As we've established many times, you can simply include fall-back coding for devices that aren't up to the current standards. If the device doesn't support a particular css then it is required to gracefully ignore it.



Quote:
Originally Posted by RbnJrg View Post
Technically, your solution is right. However, it can be an issue with some epub2 ereaders (i.e. ADE) that they won't honor the "vh" unit. So, instead of "vh", you need to employ "%". But "%" won't work unless you also define the following:

Code:
html, body {height: 100%}
If this is only for one page (a title page for example), it will work; but if is more than one page, the following pages won't be showed.

And to avoid your issues with margins (and also paddings and borders) you could use the property "box-sizing: border-box"; but again the property won't be honored by many epub2 ereaders. Today, epub2 is more a problem than a solution To me it's totally deprecated (but I still have to use epub2 properties and code )
Jinx!!

As always, it depends on the capabilities of your device.

Good point on the html, body {height:100%}!
You can also use fall-back coding for those nasty older devices that don't support 90's technology...

Code:
div[class^="v-"] {height:100%; width:100%; height:100vh; width:100vw;
                  display:table; position:fixed}
Decrepit devices will ignore the position:fixed & vh/vw if they are unsupported leaving you with:

Code:
div[class^="v-"] {height:100%; width:100%; height:100vh; width:100vw;
                  display:table; position:fixed}
IF, like the older ADE, it throws out the entire CSS if it encounters an unknown...then that is a broken system. Luckily, I won't code for such a system. IIRC ADE has fixed that.

Last edited by Turtle91; 09-15-2024 at 12:49 PM.
Turtle91 is offline   Reply With Quote