Quote:
Originally Posted by JSWolf
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
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.