View Single Post
Old 04-07-2014, 01:20 PM   #12
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Quote:
Originally Posted by Jellby View Post
That's fine, if with "subtitles" you mean sections inside chapters. If they are real subtitles (a kind of extension to the title), they are better included inside the <h*>, and you can style them, of course:

Code:
<h1>Chapter One: The Beginning
<span class="subtitle">How everything started</span></h1>
Okay, I've been trying this span class for the subtitle, but it isn't going as planned.

Situation before:
Code:
h1 {
  text-align: center;
  padding-bottom: 20px;
  padding-top: 10px;
  }
h2 {
  text-align: center;
  padding-bottom: 70px;
  padding-top: 10px;
  }
h3 {
  text-align: center;
  padding-bottom: 1.5em;
  padding-top: 1.5em;
  font-weight: normal;
  font-style: normal;
  font-size: 1em;
  }
It's fine to eliminate h2 and replace it with a span inside h1 (font-size is not really an isue here).

So now I try this:
Code:
.subtitle {
padding-bottom: 70px;
  padding-top: 30px;
}
and use this for the span class.

But the result doesn't look anything like the initial h1 h2, which are separated by sufficient padding. The extension to the title chapter number appears on the same line. I don't want to add a </br>, that doesn't feel right. But even when I do, the padding-top doesn't work, even when I set it to 100px.
What am I doing wrong?


The h3 is for real subtitles, so I think I can leave that the way it is?
JLius is offline   Reply With Quote