Reputation: 1715
Is anyone aware of a method of feeding the Kindle Fire (ebooks) a separate style-sheet? One that would not be read by iBooks (iPad)?
I am aware of the method (below) that allows you to target the old Kindle
<style type="text/css" media="amzn-mobi">
p.firstline {margin-top:20px;text-indent:-40px}
p.line {text-indent:-40px}
</style>
But I'm looking for a way of targeting Kindle Fire only.
cheers
Upvotes: 4
Views: 821
Reputation: 339
According to the George Benthien you can use @media amzn-kf8 for Kindle Fire. Hope this helps.
Those media queries apply only to eBooks, it doesn't work for HTML.
I was looking for web solution, and resorted to device sniffing via JS.
This is what I have done with jQuery:
if( /Silk/i.test(navigator.userAgent) ) {
$('html').addClass('kindle');
}
And then in CSS:
html {font-size:143.75%; }
html.kindle{font-size:112.5%}
Upvotes: 1
Reputation: 5489
From what I've read Kindle/Fire uses a webkit browser so it is pretty standard compliant ( a list of supported HTML and CSS for Kindle can be found here: kindleformatting.com/book/files/KindleHTMLtags.pdf)
You could do the reverse and target Safari Mobile and make certain elements display differently in Safari Moble. (iPad)
#content { float : left; }
[if SafMob]#content { float : none; }
More information on conditional css can be found here. But I think you're out of luck on targeting the Kindle specifically, unfortunately.
Upvotes: 0