View Single Post
Old 12-01-2020, 12:46 PM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Jellby View Post
With CSS3 tools like grid and vh you can get that in a web browser. But those are not required in ePub2, and even ePub3 readers will most likely not support them properly or at all.

...


(Nitpick: Don't use <h4>/<h2> for purely visual styling. If there are no headings higher than chapter, chapters should be <h1> [ok, or <h2> according to some], and styling inside should be done with span/div/class, as in:

...

That's Awesome! I think my Christmas project is going to be (finally) learning/transitioning to ePub3.... then I can play with these new capabilities...



For the OP -

I agree with the idea NOT to use <h> tags simply to format the style. <h> tags are used to mark your text with the correct semantics. There are multiple discussions about that here on these boards, so I won't bore you with that here. However, you might try something along these lines to simplify the chapter heading. All the styling can easily be done in the CSS file, which keeps the html file itself very clean. Of course, the css itself is just an example, you can change that however you wish - the idea is that you do the styling in the CSS file, not the html file.


Code:
  /* however you want to format... */ 
h3      {text-align:center; font-weight:bold; font-size:.8em; margin:0 0 3em}
h3 img  {display:block; margin:.5em auto; width:35%; max-width:600px}
h3 span {display:block; font-size:1.4em}
p.first {text-indent:0}
 
<h3>CHAPTER ONE <img src="..." alt=""/> <span>CHAPTER TITLE</span></h3>
<p class="first">Lorem ipsum dolor sit amet...</p>
Turtle91 is offline   Reply With Quote