User`s guide
Publishing on Kindle: Guidelines for Publishers
8.4.4 Option 4: Using @import
Media queries can specify different CSS for Mobi and KF8 formats directly using @import to include
different CSS files.
Example:
@import
@import url(common.css);
@import url(kf8.css) amzn-kf8;
@import url(mobi7.css) amzn-mobi;
Using the display:none Property with Media Queries 8.5
To specify different CSS for the content in Mobi 7 and KF8 format, use the display:none property with
media queries. Support for the display:none property in the Mobi 7 format is available in Kindlegen 2.4
and later versions.
Example:
.defaultcontent
{ display: block; }
.mobicontent
{ display: none; }
@media amzn-mobi
{
.defaultcontent
{ display: none; }
.mobicontent
{ display: block; }
}
8.5.1 Using the display:none Property with Complex Tables
Tables have extensive support in KF8, but complex tables do not render well in Mobi 7. With the
display:none property, you can use an HTML-based table for the KF8 content and an image-based
table for Mobi 7, as shown in the example below.
Example:
.defaultcontent
{ display: block; }
.mobicontent
{ display: none; }
Kindle Publishing Guidelines Amazon.com 71










