/* Random House Ebook Template - last modified 18/08/2016 Version 1.0.2 =================== STYLESHEET CONTENTS =================== * BASE STYLES - BASE HEADING STYLES - BASE BODY STYLES - BASE PAGE STYLES * OVERRIDES - JUSTIFIED - LEFT ALIGNED - CENTERED - RIGHT ALIGNED - LEFT HAND MARGIN * HANGING INDENTS * EXTRACTS * TABLES * LISTS AND BULLETS * FOOTNOTES * FONT DIFFERENTIATION * EXTRACTS WITH FONT DIFFERENTIATION * IMAGES * MEDIA QUERIES **Paragraph style set as default to: justified, fist line indent 1em, no margin. Only use classes if you need to overide one or more of these styles.** **USE H1 FOR THE TITLE PAGE ONLY. USE H2 FOR ALL MAIN HEADERS AND H3, H4 or H5 FOR ALL SUB-HEADERS** **Only alter this style sheet where indicated below, look for notes that read "This can be adjusted"** **Please see note in "Random House Ebook Template Notes" PDF (pg 4) outlining when to use text-indent and when to use margin-left** */ /* =========== BASE STYLES =========== */ @page { height: 100%; } body { font-size: 1em; margin: 0em; text-indent: 0em; padding: 0em; } /* BASE HEADING STYLES */ h1, h2, h3, h4, h5{ page-break-after: avoid; font-weight: normal; text-indent: 0em !important; padding: 0em !important; margin-left: 0em !important; display: block; width: 100%; } h1, h2{ text-align: center; } h3, h4, h5{ text-align: left; } h1{ margin: 2em 0em; font-size: 2em; } h2{ margin: 1em 0em 2em 0em; font-size: 1.5em; } h3{ margin: 1.3em 0em;/*Bottom margin can be adjusted to match PDF. Please do not alter top margin*/ font-size: 1.3em; } h4{ margin: 1.2em 0em;/*Bottom margin can be adjusted to match PDF. Please do not alter top margin*/ font-size: 1.2em; } h5{ margin: 1em 0em;/*Bottom margin can be adjusted to match PDF. Please do not alter top margin*/ font-size: 1em; } h2 + h2{ margin-top: -1em; } h2 + h3, h2 + h4, h2 + h5 { margin-top: -0.5em; } h3 + h4, h3 + h5 { margin-top: 0em; } h4 + h5{ margin-top: 0em; } /* BASE BODY STYLES */ p{ text-align: justify; margin: 0em; text-indent: 1em; orphans: 2; widows: 2; } div.break_before { page-break-before: always; } div.break_after { page-break-after: always; } .small_caps{ font-size: 75%; /*Font must be set to uppercase within HTML*/ } .smaller_font{ font-size: 85% } .section_break{ margin: 1em 0em; text-align: center; } /* BASE PAGE STYLES */ /* CONTENTS PAGE - LINKS */ .contents_link a { text-decoration: none; color: black; } .contents_link div{ text-align: left; } /* PAGE MARGINS */ div.part_page{ /*Use this for Part/Section pages EXCEPT if you are using a full page image.*/ margin: 20% 10% 0% 10%; page-break-after: always; } div.prelim_page{ /*Use this for Dedication & Epigraph pages*/ margin: 15%; } /* HEADER WRAP */ div.header_wrap{ margin: 1em auto 0em auto; text-align:center; page-break-inside: avoid; } /* ========= OVERRIDES ========= */ /* JUSTIFIED */ .not_indented{ text-indent: 0em; } .space_after{ margin-bottom: 1em; } .space_after_not_indented{ margin-bottom: 1em; text-indent: 0em; } .no_header{ margin-top: 25%; text-indent: 0em; } /* LEFT ALIGNED */ .left{ text-align: left; } .left_space_after{ text-align: left; margin-bottom: 1em; } .left_not_indented{ text-align: left; text-indent: 0em; } .left_space_after_not_indented{ text-align: left; margin-bottom: 1em; text-indent: 0em; } /* CENTERED */ .centered{ text-align: center; text-indent: 0em; } .centered_space_after{ text-align: center; margin-bottom: 1em; text-indent: 0em; } /* RIGHT ALIGNED */ .right{ text-align: right; text-indent: 0em; } .right_space_after{ text-align: right; margin-bottom: 1em; text-indent: 0em; } /* LEFT HAND MARGIN */ .margin_left1{ margin-left: 1em; text-indent: 0em; } .margin_left2{ margin-left: 2em; text-indent: 0em; } .margin_left1_space_after{ margin-left: 1em; margin-bottom: 1em; text-indent: 0em; } .margin_left2_space_after{ margin-left: 2em; margin-bottom: 1em; text-indent: 0em; } /* =============== HANGING INDENTS =============== */ .hanging_indent { margin: 1em auto 1em 0em; } .hanging_indent p { margin-left: 1em !important; text-indent: -1em !important; } .hanging_indent_space_after { margin: 1em auto 1em 0em; } .hanging_indent_space_after p { margin-left: 1em !important; text-indent: -1em !important; margin-bottom:1em; } .hanging_indent_header { margin-left: 1em !important; text-indent: -1em !important; /*This class can be adjusted as needed*/ } .index { margin: 1em auto 1em 0em; } .index p { margin-left: 1em; text-indent: -1em; font-size: 85%; } .index p.margin_left1 { margin-left: 2em; } .index p.margin_left2 { margin-left: 3em; } /* ======== EXTRACTS ======== */ .extract{ margin: 1em; } .extract_small_font{ margin: 1em; font-size: 80%; } .extract_no_space_after{ margin: 1em 1em 0em 1em; } .extract_no_space_after_small{ margin: 1em 1em 0em 1em; font-size: 80%; } .hanging_indent_extract { margin: 1em; } .hanging_indent_extract p { margin-left: 1em; text-indent: -1em; } .stanza{ margin-bottom: 1em; } /* ====== TABLES ====== Only use tables for tabular data which cannot be formatted in any other way, and for tables which are MAXIUM 2/3 columns wide. For complex/long tables, please use an image instead (png or gif). */ table{ margin: 1em auto 0em 0em; } td{ vertical-align: top; padding: 3px; } /* ====== LISTS AND BULLETS ====== */ ul, ol{ margin: 1em; text-align: left; } ol.alt_list_style{ list-style-type: lower-latin; /*This can be adjusted*/ } ol.alt_list_style li{ margin-bottom: 1em; /*This can be adjusted or removed*/ } ul.alt_list_style{ list-style-type: square; /*This can be adjusted*/ } ul.alt_list_style li{ margin-bottom: 0em; /*This can be adjusted or removed*/ } /* ====== FOOTNOTES ====== */ a.footnote { display: inline; vertical-align: super; font-size: 65%; } aside { display: block; } aside a{ vertical-align: super; font-size: 70%; } a.endnote { font-size: 65%; } /* ====== FONT DIFFERENTIATION ====== */ span.sans_serif{ font-family: sans-serif; } span.monospace{ font-family: monospace; } span.font_color{ color: rgb(254,80,9); /*This can be adjusted. Do not use colours which are too light to read on Kindle e-ink devices*/ } span.underline { text-decoration:underline; } span.strikethrough { text-decoration:line-through; } span.overline { text-decoration:overline; } /* ====== EXTRACTS WITH FONT DIFFERENTIATION ====== */ .extract_sans_serif{ font-family: sans-serif; margin: 1em; } .extract_monospace{ font-family: monospace; margin: 1em; } /* ====== IMAGES ====== */ img { /*-- iOS8 Image Fix --*/ display: inline-block; } /* ========================================= Inline Images Example (Apply to image, adjust values as needed) ========================================= */ .inline_image { height: 0.2em; /* Variable, adjust as necessary */ vertical-align: middle; /* Top, middle, bottom as needed */ } .inline_image_2 { height: 0.3em; /* Variable, adjust as necessary */ vertical-align: middle; /* Top, middle, bottom as needed */ } .inline_image_3 { height: 1.5em; /* Variable, adjust as necessary */ vertical-align: top; /* Top, middle, bottom as needed */ } /* ============ Small Images ============ */ .portrait_small { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em 32.5%; width: 35%; } .portrait_small img { page-break-inside: avoid; width: 100%; } .landscape_small { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em 20%; width: 60%; } .landscape_small img { page-break-inside: avoid; width: 100%; } /* ============== Default Images ============== */ .portrait_default { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em 30%; width: 40%; } .portrait_default img { page-break-inside: avoid; width: 100%; } .landscape_default { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em 15%; width: 70%; } .landscape_default img { page-break-inside: avoid; width: 100%; } /* ============= Medium Images ============= */ .portrait_medium { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em 25%; width: 50%; } .portrait_medium img { page-break-inside: avoid; width: 100%; } .landscape_medium { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em 8%; width: 84%; } .landscape_medium img { page-break-inside: avoid; width: 100%; } /* ============================================== Large Images + Double Page Spread (DPS) Images ============================================== */ .portrait_large { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em 17.5%; width: 65%; } .portrait_large img { page-break-inside: avoid; width: 100%; } .landscape_large { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 1.5em auto; width: 100%; } .landscape_large img { page-break-inside: avoid; width: 100%; } /* ================ Full Page Images ================ */ .image_full, .image_full_caption { text-align: center; page-break-after: always; page-break-inside: avoid; overflow: hidden; clear: both; padding: 0px; margin: 0em auto; height: 99%; height: 99vh; width: 100%; } .image_full img { page-break-inside: avoid; max-width: 100%; max-height: 100%; } .image_full_caption img { page-break-inside: avoid; height: 90%; } .cover_image { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; padding: 0px; margin: 0em auto; height: 99%; height: 99vh; width: 100%; } .cover_image img { page-break-inside: avoid; height: 100%; max-width: 100%; } /* ============= MEDIA QUERIES ============= /* /* KINDLE IMAGE FIXES */ @media amzn-kf8 { /* KF8 Small Images == */ .portrait_small { text-align: center; width: 100%; margin: 1.5em auto; } .portrait_small img { width: 35%; } .landscape_small { text-align: center; width: 100%; margin: 1.5em auto; } .landscape_small img { width: 60%; } /* == KF8 Default Images == */ .portrait_default { text-align: center; width: 100%; margin: 1.5em auto; } .portrait_default img { width: 40%; } .landscape_default { text-align: center; width: 100%; margin: 1.5em auto; } .landscape_default img { width: 70%; } /* == KF8 Medium Images == */ .portrait_medium { text-align: center; width: 100%; margin: 1.5em auto; } .portrait_medium img { width: 50%; } .landscape_medium { text-align: center; width: 100%; margin: 1.5em auto; } .landscape_medium img { width: 84%; } /* == KF8 Large Images == */ .portrait_large { width: 100%; margin: 1.5em auto; } .portrait_large img { width: 65%; } .landscape_large { text-align: center; width: 100%; margin: 1.5em auto; } .landscape_large img { width: 100%; } /* == KF8 FULL PAGE IMAGES == */ .image_full, .image_full_caption { text-align: center; height: 100%; width: 100%; } .image_full img { height: 99%; } .image_full_caption img { height: 90%; } }/* -- End KF8 Image Fix Media Queries --*/ div.caption { width: 100%; margin-top: 0.5em; padding: 0px; page-break-before: avoid; page-break-inside: avoid; text-align: center; font-size: 80%; line-height: 1.3em; } /* JI style */ .no_header_1{ margin-top: 25%; text-indent: 0em; text-align: center; } .tp_title { margin-bottom: 0.5em; } .fm_sub_title { text-align: center; margin-top: 0em; } .tp_author { margin-top: 3em; margin-bottom: 0em; } .inline_image_4 { height: 5.5em; /* Variable, adjust as necessary */ vertical-align: top; /* Top, middle, bottom as needed */ } .space_before_not_indented { margin-top: 1em; text-indent: 0em; } .chapter_title { font-style: italic; } .extract_BS{ margin: 1em 1em 3em 1em; } .hanging_indent_1 { margin: 1em; } .hanging_indent_1 p { margin-left: 1em; text-indent: -1em; } .bold_italic { font-weight: bold; font-style: italic; }