View Single Post
Old 10-10-2020, 06:29 PM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,830
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by EuroScribe View Post
EXAMPLE: https://imgur.com/uVySKKY

Hi everyone, I am using Jutoh Plus to create my book and I would like my Chapter Headings to look like the one above. Jutoh Plus allows near complete control over HTML and CSS so I am wondering if I can add a bit of CSS code to H1 section to get them to look like this?

Can anyone help please?

It will be much appreciated.

In your .xhtml file write the following:

Code:
<h1 class="MyHeading">CHAPTER 1</h1>
and in your .css file write:

Code:
.MyHeading {
      width: 50%; /* or the width you wish */
      margin-left: 25%; /* this must be according to the previous width */
      margin-right: 25%;
      margin-bottom: 2em; /* or whatever you like */
      color: white;
      background: lightblue;
      font-family: sans-serif;
      font-size: 1.1em;
      text-align: center;
}
That code should work everywhere.

Regards
Ruben
RbnJrg is offline   Reply With Quote