User`s guide

Publishing on Kindle: Guidelines for Publishers
3.1.7 Text Guideline #7: CSS Support
The earlier Kindle platform offered very basic support for Cascading Style Sheets (CSS). This has been
significantly enhanced in KF8 with support for CSS 2/CSS 3. (See section 11.2 for the list of supported
CSS attributes/selectors). To verify that your use of CSS elements displays the way you intended,
preview your Kindle book on different devices before publishing it.
Avoid using fixed values such as points and pixels for CSS properties such as font-size, width,
height, margin, padding, text-indent, and line-height. To enable rendering across various
screen sizes and resolutions, specify these values in percentages.
When using the margin and padding CSS properties, specify the values in percentage (%) instead of
em units. This ensures that the margins do not grow wide with large font sizes. Margins should be
assigned values of 0 or greater to keep content from falling off the edge of the screen or overlapping
other content. Always set left and right margins to 0 for normal body text to allow users the full range of
margin selection using device defaults.
To ensure pagination, the Kindle Reader does not honor line-height value less than 1.2 em or 120%.
Elements such as drop caps should be specified using percentages or relative units (positive or negative)
instead of fixed values such as points and pixels. (Example: drop caps: Use font-size: 300%). The top of
the drop cap should be aligned with the body text. To create drop caps, Amazon recommends using the
following sample CSS:
Example
p.para {
font-family: "Times New Roman";
font-size: 4em;
margin-bottom: 0;
margin-top: 0;
text-align: justify;
text-indent: 0;
}
@media amzn-kf8
{
span.dropcaps
{
font-weight:normal;
font-size:320%;
float:left;
margin-top:-0.3225em;
margin-bottom:-0.3245em;
}
}
@media amzn-mobi
Kindle Publishing Guidelines Amazon.com 14