View Single Post
Old 10-10-2020, 08:58 PM   #5
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by hobnail View Post
I vaguely recall banging my head against this a long time ago and never found a solution.
If you want the coloured box to match content width you can add a span with padding/colours. Something like this:

Code:
<h1 class="heading"><span class="decor">CHAPTER 1</span></h1>
<h1 class="heading"><span class="decor">Chapter One Hundred and Fifty-Two</span></h1>
Code:
.heading {
    font-family: sans-serif;
    font-size: 1.1em;
    margin: 3em 0;
    text-align: center;
    text-indent:0;}

.decor {
    background: teal;
    color: white;
    padding: 0.5em 1em;
}
jackie_w is offline   Reply With Quote