/* Random House Ebook Template - last modified 13/12/2016 Version 1.0.3 =================== 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 * REPLACE EMOJI CHARACTERS WITH TEXT - FIX **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** */ /* PRH CORE ASSET - DO NOT DELETE!! (Used for class .noemoji only - please do not embed other fonts) @font-face { font-family: "noemoji"; font-weight: normal; font-style: normal; src: url(../prh_core_assets/fonts/symbola.otf); }*/ /* END PRH CORE ASSET!! */ /* =========== 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 1em; text-indent: 1em; orphans: 2; widows: 2; } .big_top{ margin-top: 5em; } .chapter_start{ margin-top: 15em; } .chapter_mid{ page-break-before: always; padding-top: 15em; } .sans{ font-family: sans-serif; } .italic{ font-style: italic; } .bold{ font-style: bold; } .pagebreak_before { page-break-before: always; margin-bottom: 0em !important; padding-bottom: 0em !important; } .pagebreak_after { page-break-after: always; margin-bottom: 0em !important; padding-bottom: 0em !important; } .small_caps{ font-size: 75%; /*Font must be set to uppercase within HTML*/ } .smaller{ font-size: 90% } .section_break{ text-indent: 0em; margin: 1em 0em; text-align: center; } .poetry{ text-indent: 0em; margin: 1em 2em; } .poetry_space_after{ text-align: center; margin-bottom: 2em; } .acknowledgements-sub{ font-size: 1.3em; margin: 1em 0em; } /* 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: 5em 2em 0% 2em; page-break-after: always; } div.prelim_page{ /*Use this for Dedication & Epigraph pages*/ margin: 4em 4em 0em 4em; } .dedication{ font-size: 110%; text-align: center; line-height: 130%; } .strong{ font-weight: bold; } .smile{ font-size: 120%; } .chapter_acknowledgments{ margin: 5em 1em 3em 1em; width: 40%; } .chapter_acknowledgments img{ width: 100%; } .chapter_about_the_author{ margin: 5em 1em 3em 1em; width: 45%; } .chapter_about_the_author img{ width: 100%; } .chapter_title1{ text-indent: 0em; margin: 5em 1em 2em 1em; font-size: 100%; font-size: 180%; font-family: serif; text-align: center; letter-spacing: 0em; } .chapter_title2{ text-indent: 0em; margin: 0em 1em 3em 1em; font-size: 100%; font-size: 140%; font-family: serif; text-align: center; letter-spacing: 0.1em; } .chapter_title3{ text-indent: 0em; margin: 5em 1em 3em 1em; font-size: 100%; font-size: 140%; font-family: serif; text-align: center; letter-spacing: 0.1em; } .chapter_break{ margin: 2% 0% 2%; text-align: center; } .chapter_image{ text-align: center; page-break-inside: avoid; margin: 0em auto 1em; width: 100%; } .chapter_image img{ page-break-inside: avoid; width: 100%; } .chapter_imageTall{ text-align: center; page-break-inside: avoid; margin: 3em auto 1em; width: 26%; } .chapter_imageTall img{ page-break-inside: avoid; width: 100%; } .part_image{ text-align: center; page-break-inside: avoid; margin: 5em auto 1em; width: 60%; } .part_image img{ page-break-inside: avoid; width: 100%; } .dedication_image{ text-align: center; page-break-inside: avoid; margin: 1em auto 1em; width: 40%; } .dedication_image img{ page-break-inside: avoid; width: 100%; } .title_image{ text-align: center; page-break-inside: avoid; margin: 1em auto 1em; width: 80%; } .title_image img{ page-break-inside: avoid; width: 100%; } .title_small{ text-align: center; page-break-inside: avoid; margin: 1em auto 1em; width: 60%; } .title_small img{ page-break-inside: avoid; width: 100%; } .cover_small{ text-align: center; page-break-inside: avoid; margin: 1em auto 1em; width: 30%; } .cover_small img{ page-break-inside: avoid; width: 100%; } .drop_cap{ font-size: 130%; } .small_caps{ font-size: 80%; } .bigger{ font-size: 140%; } .more_margin{ margin: 0em 4em; } .letter_sans{ font-family: Sans-Serif, Serif; margin: 0em 2em; } .letter_sans_inline{ font-family: Sans-Serif, Serif; } .praise_title{ font-family: sans-serif; text-align: center; margin-bottom: 1em; font-weight: bold; text-indent: 0em; } .praise{ font-family: sans-serif; text-align: center; text-indent: 0em; } /* HEADER WRAP */ div.header_wrap{ margin: 2em auto 5em auto; text-align:center; page-break-inside: avoid; } /* ========= OVERRIDES ========= */ /* JUSTIFIED */ .not_indented{ text-indent: 0em; } .space_after{ margin-bottom: 3em; } .small_space_after{ margin-bottom: 1em; } .space_after_more{ margin-bottom: 2em; } .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; } .left_image{ margin: 1% 0%; text-align: left; width: 50%; text-indent: 0em; } .left_image img{ width: 100%; } /* CENTERED */ .centered{ text-align: center; text-indent: 0em; } .centered_space_after{ text-align: center; margin-bottom: 1em; text-indent: 0em; } .centered_image_small{ margin-top: 1%; margin-left: auto; margin-right: auto; margin-bottom: 1%; text-align: center; width: 15%; } .centered_image_small img{ width: 100%; height: auto; } .centered_image{ margin-top: 1%; margin-left: auto; margin-right: auto; margin-bottom: 1%; text-align: center; width: 30%; } .centered_image img{ width: 100%; height: auto; } .centered_image_large{ margin-top: 1%; margin-left: auto; margin-right: auto; margin-bottom: 1%; text-align: center; width: 50%; } .centered_image_large img{ width: 100%; height: auto; } /* 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; } .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 MAXIMUM 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; } .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; } div.caption { width: 100%; margin: -1em auto 1em auto; padding: 0px; page-break-before: avoid; text-align: center; font-size: 0.8em; line-height: 1.3em; } /* ========================================= Inline Images Example (Apply to image, adjust values as needed) ========================================= */ .inline_image { height: 2.3em; /* Variable, adjust as necessary */ vertical-align: middle; /* Top, middle, bottom as needed */ } .inline_image_2 { height: 0.5em; /* Variable, adjust as necessary */ vertical-align: middle; /* Top, middle, bottom as needed */ width: 100%; } .inline_image_3 { height: 2em; /* Variable, adjust as necessary */ vertical-align: top; /* Top, middle, bottom as needed */ } /* ================== Extra Small Images ================== */ .portrait_xsmall { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 28%; } .portrait_xsmall img { page-break-inside: avoid; width: 100%; } .portrait_xsmall + .caption { width: 35%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_xsmall { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 50%; } .landscape_xsmall img { page-break-inside: avoid; width: 100%; } .landscape_xsmall + .caption { width: 60%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============ Small Images ============ */ .portrait_small { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 35%; } .portrait_small img { page-break-inside: avoid; width: 100%; } .portrait_small + .caption { width: 35%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_small { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 60%; } .landscape_small img { page-break-inside: avoid; width: 100%; } .landscape_small + .caption { width: 60%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============== Default Images ============== */ .portrait_default { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 40%; } .portrait_default img { page-break-inside: avoid; width: 100%; } .portrait_default + .caption { width: 40%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_default { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 70%; } .landscape_default img { page-break-inside: avoid; width: 100%; } .landscape_default + .caption { width: 70%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============= Medium Images ============= */ .portrait_medium { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 50%; } .portrait_medium img { page-break-inside: avoid; width: 100%; } .portrait_medium + .caption { width: 50%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_medium { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 84%; } .landscape_medium img { page-break-inside: avoid; width: 100%; } .landscape_medium + .caption { width: 84%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============================================== Large Images + Double Page Spread (DPS) Images ============================================== */ .portrait_large { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 65%; } .portrait_large img { page-break-inside: avoid; width: 100%; } .portrait_large + .caption { width: 65%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_large { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 100%; } .landscape_large img { page-break-inside: avoid; width: 100%; } .landscape_large + .caption { width: 100%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ================ FULL PAGE IMAGES ================ */ .image_full { text-align: center; page-break-before: always; page-break-after: always; page-break-inside: avoid; padding: 0px; margin: 1em auto 1em; height: 99%; width: 100%; } .image_full img { page-break-inside: avoid; max-width: 100%; max-height: 100%; } .image_full_caption { text-align: center; page-break-before: always; page-break-after: avoid; page-break-inside: avoid; padding: 0px; margin: 0px auto; width: 100%; } .image_full_caption img { page-break-inside: avoid; width: 87%; } .image_full_caption + .caption { width: 90%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; page-break-after: always; margin-top: 0.5em; } .cover_image { text-align: center; page-break-inside: avoid; overflow: hidden; padding: 0px; margin: 0em auto; height: 99%; height: 99vh; width: 100%; } .cover_image img { page-break-inside: avoid; height: 100%; max-width: 100%; } /* ==================== Plate Section Images ==================== */ .plate_image_portrait { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 70%; } .plate_image_portrait img { page-break-inside: avoid; width: 100%; } .plate_image_landscape { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 90%; } .plate_image_landscape img { page-break-inside: avoid; width: 100%; } .plate_image_portrait + .caption, .plate_image_landscape + .caption { width: 90%; /* Caption width can be adjusted here if needed */ font-style: normal; page-break-inside: avoid; } .plate_image_portrait_narrow { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 40%; } .plate_image_portrait_narrow img { page-break-inside: avoid; width: 100%; } .plate_image_portrait_narrow + .caption { width: 90%; /* Caption width can be adjusted here if needed */ font-style: normal; page-break-inside: avoid; } /* ============= REPLACE EMOJI CHARACTERS WITH TEXT - WEBKIT FIX ============= */ .noemoji { font-family: "noemoji"; font-size: inherit; /* variable */ font-weight: normal; } @media not amzn-kf8 { .noemoji:after { content: " \FE0E"; /*Please note the space before the escape delimiter ’\’ MUST be maintained or the fix breaks.*/ } } /* -- PLEASE ADD ADDITIONAL STYLES BELOW IF NEEDED -- */ .small_space_both{ margin-top: 1em; margin-bottom: 1em; } .space_before_not_indented{ margin-top: 1em; text-indent: 0em; } .centered_space_before{ text-align: center; margin-top: 1em; text-indent: 0em; } .space_before{ margin-top: 3em; } .small_space_before{ margin-top: 1em; } .big_margin{ margin-left: 5%; } h2.right{ text-align: right; text-indent: 0em; font-style:italic; } h2.left{ text-align: left; text-indent: 0em; font-style:italic; } .centeredTop_s { text-align: center; text-indent: 0em; margin-top: 25%; margin-bottom: 1em; } .part_title { margin-top: 1.5em; font-size: xx-large; font-family: sans-serif; font-weight: bold; } .c_title { text-align: right; margin-bottom: 1em; font-style: italic; }