View Single Post
Old 12-14-2013, 12:45 PM   #94
Psymon
Chief Bohemian Misfit
Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.
 
Psymon's Avatar
 
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
Rubén! Rubén! Rubén! I need your help again! I hope you work on weekends (ha ha)!

Quote:
Originally Posted by RbnJrg View Post
Yes, you can do that by using "media queries". It will take you a bit of work but you can achieve that things degrade gracefully. All styles you want to be used by modern Kindle devices, you must enclosed them between:

@media amzn-kf8 {
...
Here must be all styles for kf8.
...
}

And styles you want to be used by old Kindle devices must be enclosed between:

@media amzn-mobi {
...
Here must be all styles for mobi.
...
}
Okay! I've been working on getting my first epub (which is already up for sale on the iBooks store) converted so that it will also work in Kindle, and I just wanted to confirm something re the above, and also ask a "how-to" question...

Firstly, I think you already answered this, but the stylesheet that I've been using for iBooks/ADE should work fine for KF8 -- correct? So I don't need to make any changes/additions to that?

Assuming that's right, then the only thing I need to do up now is separate styles for mobi. As you described above, these would be done in the same stylesheet, but I seem to recall a way of detecting a device and then importing an entirely separate stylesheet, i.e. can I do something like this, and just put this in my main (iBooks/ADE) stylesheet?...

@media amzn-mobi {
@import url("../Styles/mobi.css");
}

This would greatly simplify designing that stylesheet, actually. In Sigil, I could very easily do a search & replace for the stylesheet references in all my HTML files and change them to point to that mobi.css, then design the latter how I want it to look -- all the while that I can actually "see" how it will look right there in Sigil -- and then when I'm done I just do a search and replace and change it back again.

I presume that makes sense?

EDIT: I'm such a dummy sometimes -- sheesh! Instead, I just put all my mobi styles at the end of my CSS file (but not wrapped in that "@media amzn-mobi", of course) and have just been getting all my styles figured out that way. Duh! So never mind -- re the above, anyway. I'm so dumb sometimes, don't mind me. :/

One other question, on a different subject... in my iBooks/ADE version, I have a few links to websites (not in my main text, but just in my CIP data at the back of the book, in the "small print"). What happens with web links in devices that can't be used as a browser? On the iPad (and Mac) that's no problem, of course -- it just switches over to Safari and displays the web page -- but I have no idea what happens in other devices.

I'm wondering, I guess, if perhaps I should just get rid of those web links completely, or if perhaps I should just write out the URL in full. For example, right now I have stuff like this...

<a href="http://www.DomainName.com">A Website Somewhere</a>

I'm assuming that won't work in some Kindles -- since it's not a web browser -- so would the best way to do that be to change that to something like this?...

<a href="http://www.DomainName.com">www.DomainName.com</a>

At least then the reader can "see" what the link is, even if their device doesn't allow them to actually click on it, and go to it.

Any thoughts on that would be most welcome! Thanks again, in advance!

Last edited by Psymon; 12-14-2013 at 02:58 PM.
Psymon is offline   Reply With Quote