View Single Post
Old 04-27-2014, 02:59 AM   #61
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>


Only if the particular size is important to you. You can probably rely on <h1> being larger than <h2>, and both larger than the normal text, but if you want the sizes in some definite proportion or whatever, you better define it.
I've encountered something weird - weird to me, for you guys it's probably normal.

So I have this for my titles:

Code:
h1 {
  text-align: center;
  padding-bottom: 70px;
  padding-top: 10px;
  font-family: "Libre Baskerville", serif;
	font-size: 2em;
}
.subtitel {
  padding-top: 30px;
  display: block;
}
.subsubtitel {
	display: block;
	padding-top: 30px;
  font-size: 1em;
	font-weight: normal;
}
And this in my html:

Code:
 <h1>chapternumber

  <span class="subtitel">subtitel same size as chapternumber</span>
<span class="subsubtitel">subsubtitel that should be smaller</span>
	
</h1>
What really happens: subsubtitel is the same size as the subtitel and chapternumber. When I change font-size subsubtitel to 2em, it is dubbel the size of the chapternumber and subtitel. When I change to 0.7, it looks about the same size als my normal paragraphs, which are 1em in size.

How is this possible? I set the font-size for h1 to 2em.
JLius is offline   Reply With Quote