|  05-02-2019, 09:18 AM | #16 | |
| Bookmaker & Cat Slave            Posts: 11,503 Karma: 158448243 Join Date: Apr 2010 Location: Phoenix, AZ Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2 | Quote: 
 Hitch | |
|   |   | 
|  05-02-2019, 11:43 AM | #17 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
 Other things you can use to decorate. border (top, bottom) lines, padding spaces the lines out from the text box (block). Playing with the Box model is the key A single H tag is a box for you to decorate   | |
|   |   | 
|  05-02-2019, 12:20 PM | #18 | 
| Guru            Posts: 684 Karma: 4568205 Join Date: Jan 2010 Location: Sweden Device: Kobo Forma | 
			
			Thanks, yes I played with line-height, but it also changed the space between the second line (when it was spread over two lines on the device.) But your suggestion about block did the trick!  h3 { line-height:4em; } .line2 { display:block; line-height:1em; } Seems to give the flexibility I wanted. | 
|   |   | 
|  05-02-2019, 02:15 PM | #19 | |
| Wizard            Posts: 1,876 Karma: 8821117 Join Date: Mar 2013 Location: Rosario - Santa Fe - Argentina Device: Kindle 4 NT | Quote: 
  ). In those cases, I used something like: Code: <h2 class="hidden" title="My Title Chapter here"></h2> <table> ... </table> Code: .hidden {
    display: none;
} | |
|   |   | 
|  05-02-2019, 05:04 PM | #20 | 
| Imperfect Perfectionist            Posts: 715 Karma: 863576 Join Date: Dec 2011 Location: Ølstykke, Denmark Device: none | 
			
			I've no intention of starting a long and esoteric discussion, but reading the latest posts here I can't help thinking, that we're inventing obstacles where none are to be found. I can't find anywhere any indication whatsoever that it should be "bad" to style <Hx>-elements with css or having to hide them. But I can find tons of examples of what to do with them in css … And I know, that an empty Hx tag would be real bad for search engine optimization, if it occured on a "real" webpage. In an epub, it will pass epubcheck, but ACE will generate an error "Element does not have text that is visible to screen readers …" Just my 2 ¢ thoughts … Regards, Kim Kim | 
|   |   | 
|  05-02-2019, 06:52 PM | #21 | 
| Wizard            Posts: 1,876 Karma: 8821117 Join Date: Mar 2013 Location: Rosario - Santa Fe - Argentina Device: Kindle 4 NT | 
			
			Please, tell me how to style a chapter title (in the center) with an image to the left and and an image on the right and with a border on top (from margin to margin). All always in the same line and in perfect alineation no matter the font size choosen by the reader. Try coding that with <h*> tags and floating the images and you'll discover interesting things. Not always to employ <h*> tags for titles is the best, more over if we take in count the economy of coding. All depend on the circunstances; sometimes using <h*> tags will be good and convinient and sometimes not. To use <h*> tags is not good nor bad, is the work you are doing what will determine what is better to employ.
		 Last edited by RbnJrg; 05-02-2019 at 06:58 PM. | 
|   |   | 
|  05-02-2019, 06:54 PM | #22 | |
| Resident Curmudgeon            Posts: 80,727 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | Quote: 
 Code: h3 {
  margin-top: 1em;
  margin-bottom: 1.5em;
  text-align: center;
}
.line2 {
  font-weight: bold;
  text-align: center;
} | |
|   |   | 
|  05-02-2019, 07:04 PM | #23 | |
| Imperfect Perfectionist            Posts: 715 Karma: 863576 Join Date: Dec 2011 Location: Ølstykke, Denmark Device: none | Quote: 
 Regards, Kim | |
|   |   | 
|  05-02-2019, 09:26 PM | #24 | |
| Bookmaker & Cat Slave            Posts: 11,503 Karma: 158448243 Join Date: Apr 2010 Location: Phoenix, AZ Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2 | Quote: 
 Offered FWIW. Hitch | |
|   |   | 
|  05-02-2019, 09:27 PM | #25 | |
| Wizard            Posts: 1,876 Karma: 8821117 Join Date: Mar 2013 Location: Rosario - Santa Fe - Argentina Device: Kindle 4 NT | Quote: 
   | |
|   |   | 
|  05-02-2019, 10:46 PM | #26 | |
| A Hairy Wizard            Posts: 3,395 Karma: 20212733 Join Date: Dec 2012 Location: Charleston, SC today Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire | Quote: 
 My example uses 'display: block' correctly in a minimalist fashion and achieves the OP's request quite well (it is even in pretty CSS just for you!): Code: <h3>Chapter 1 <span>The Ending of the Beginning</span></h3>
/* (however you want to style it:) */
h3 {
	font-size: .75em;
	margin: 2em 0;
	text-align: center;
	font-weight: bold;
        font-family: sans-serif
    }
h3 span {
	display: block;
        font-size: 2em;
        margin-top: 1em;
        font-weight: normal;
        font-family: serif;
        font-variant: small-caps
   }Last edited by Turtle91; 05-02-2019 at 10:50 PM. | |
|   |   | 
|  05-03-2019, 12:35 AM | #27 | |
| Bibliophagist            Posts: 48,088 Karma: 174315300 Join Date: Jul 2010 Location: Vancouver Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos | Quote: 
 I have to admit that I like studying other people choices in styling an ebook. There's always the chance of finding a nugget of code which I can file the serial numbers off of and incorporate into my personal stylesheet collection. | |
|   |   | 
|  05-03-2019, 01:12 AM | #28 | |
| Bookmaker & Cat Slave            Posts: 11,503 Karma: 158448243 Join Date: Apr 2010 Location: Phoenix, AZ Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2 | Quote: 
  Hitch | |
|   |   | 
|  05-03-2019, 04:26 AM | #29 | |
| Guru            Posts: 684 Karma: 4568205 Join Date: Jan 2010 Location: Sweden Device: Kobo Forma | Quote: 
 How about you read the posts, and then make an example, without line-height or display:block which gives that outcome. Can you do that? | |
|   |   | 
|  05-03-2019, 08:49 AM | #30 | |
| A Hairy Wizard            Posts: 3,395 Karma: 20212733 Join Date: Dec 2012 Location: Charleston, SC today Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire | Quote: 
 Code: <h3>Chapter 1</h3> <p class="line2">The Ending of the Beginning</p> Code: <h3 title="Chapter 1 The Ending of the Beginning">Chapter 1</h3> <p class="line2">The Ending of the Beginning</p> Code: <h3>Chapter 1 <span>The Ending of the Beginning</span></h3> Last edited by Turtle91; 05-03-2019 at 08:52 AM. | |
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Help with Chapter seperators (lines underneath chapter headings) | indieauthor83 | Sigil | 9 | 06-23-2017 06:01 AM | 
| Next chapter in the saga of poor ebook formatting | Joques | General Discussions | 140 | 05-13-2015 05:31 PM | 
| xpath to insert chapter breaks - but chapter name cut off ? | Rob557 | Conversion | 2 | 03-06-2014 06:59 AM | 
| Formatting Chapter Breaks? | NVash | Calibre | 3 | 12-09-2010 05:09 AM | 
| Formatting error causes a whole chapter to be unreadable | kjturner71 | Kobo Reader | 3 | 11-08-2010 04:50 PM |