Quote:
Originally Posted by Doitsu
|
although if you were reading the ebook in a browser on a smartphone/tablet it would still hide the content.
Quote:
Originally Posted by spotrick
This is more complicated than it sounds. I have some components of my ebooks that are there purely for readers using a browser. E.g. navigation at the end of a chapter. In an ePub ereader, or a Kindle, these components are redundant, so I'd like to be able to hide them.
I can use CSS display:none; -- but then I'd need to use a different stylesheet for epub than for the web.
So I'm wondering if there's a CSS hack that can be used that would only be seen by a web browser, but be ignored by epub readers. Kind of like the hacks used to make older versions of IE work.
Anyone know of any usable hacks?
|
are the epub's ncx or opf functional in the browser version (in an epub reading engine), or are you just displaying the book's html in the browser?
one (very extravagant) workaround might be to embed a script querying the browser, and load the browser-only css that way. i think there'd be a way for you could target userAgent safari and userAgent chrome to avoid loading your css on webkit-based readers, and you'd end up with a huge conditional statement querying specific vendors, and then defaulting to the standard epub css.
http://stackoverflow.com/questions/6...et-only-safari
there has to be an easier way though.