Quote:
Originally Posted by JSWolf
Will it validate in ePubcheck 1.1, 1.2 and the release of 3.0? Also, put in the code needed for iBooks to detect the screen size and pick and image based on if an iPad or an iPhone and then validate.
|
That was just a tiny bit of the CSS to prove that point. However, the book also contains this CSS file:
Code:
@media not screen
{
html body {
margin-left: 2em;
margin-right: 2em;
}
}
@media screen and (min-device-width:961px)
{
html body {
margin-left: 2em;
margin-right: 2em;
}
}
/* iOS and other phones in portrait mode:
*/
@media screen and (max-device-width:960px) and (orientation:portrait)
{
/* html body { */
/* Sadly, this doesn't work. I'd really like to knock about an em off the
default iBook margins on iPhone/iPod Touch. */
/* -ibooks-gutter-margin-left: 0px !important; */
/* -ibooks-gutter-margin-right: 0px !important; */
/* } */
/* Reduce size of chapter numbers and
indentation so that they don't
run off the screen. */
div.chapternumber {
font-size: 20pt !important;
padding-left: 10pt !important;
padding-right: 10pt !important;
}
/* Reduce chapter heading indentation to
match the chapter number. */
div.chapterheading
{
margin-left: 10pt !important;
}
/* Reduce bottom margin of chapter numbers
so that it isn't so oversized. */
div.chapternumber + p {
margin-top: 3em !important;
}
blockquote {
margin-left: 2em !important;
margin-right: 2em !important;
}
/* Reduce left and right margins so that the
blockquote bits have more than two words
per line. */
/* html {
margin-left: 0 !important;
margin-right: 0 !important;
} */
/* html body {
margin-left: 6px !important;
margin-right: 6px !important;
} */
}
@page {
margin-left: 0 !important;
margin-right: 0 !important;
}
/* iOS and other phones in landscape mode
*/
@media screen and (max-device-height:960px) and (orientation:landscape)
{
/* Reduce bottom margin of chapter numbers
so that they don't waste an entire page. */
div.chapternumber + p {
margin-top: 3em !important;
}
html body {
margin-left: 2em;
margin-right: 2em;
}
}
.whiteout
{
/* ADE chokes on this IE-ism, too. It probably isn't
necessary in the real world of EPUBs, but it really
shouldn't *break* the entire stylesheet.... */
filter:alpha(opacity=0);
}
Again, this is a separate stylesheet to avoid the aforementioned ADE bug, but it validates just fine, and iBooks respects its contents, as do a number of other readers on iOS (Kobo, for example).