Thread: Stylesheets
View Single Post
Old 10-27-2014, 05:42 AM   #6
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,060
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Maybe this kind of newbie-thread (in so far as css is concerned) is the right one for my problem:
I have a text with notes (adjoint to the relative chapters). I added a ".notes"-paragraph style to make the notes look a bit different from the "normal" text (it is from Project Gutenberg). O.k., this worked. There are some notes with citations from other books, esp. poems, and I wanted to emphasize them a bit within the notes. So I added a ".cite" class with larger margin-left and smaller margin-top and margin-bottom.
Code:
p {
    display: block;
    font-size: 1em;
    line-height: normal;
    margin-bottom: 0.3em;
    margin-top: 0.3em;
    text-indent: 1em;
    text-align: justify
    }
.noindent {
    display: block;
    font-size: 1em;
    line-height: normal;
    margin-bottom: 0.3em;
    margin-top: 0.3em;
    text-indent: 0;
    text-align: justify
}
.notes {
    display: block;
    font-size: 1em;
    font-style: italic;
    line-height: normal;
    margin-bottom: 0.3em;
    margin-top: 0.3em;
    margin-left: 2em;
    text-indent: 0;
    text-align: justify
}
.cite {
    display: block;
    font-size: 1em;
    font-style: italic;
    line-height: normal;
    margin-bottom: 0.1em;
    margin-top: 0.1em;
    margin-left: 4em;
    text-indent: 0;
    text-align: left
}
When I applied this to the text (each single line of a poem), the surprise was that
- the text was not italic,
- left margin took no effect,
- instead of smaller margins, they became larger (top and bottom), not only in relation to the preceeding ".notes"-class, but also in relation to a preceeding ".cite"-class.

Any trial to change the settings of the ".cite"-class had no effect at all.

Okay, I could apply the normal ".notes"-class and work with <br />, but I would really like to know what was going wrong. Anybody who could explain it to me? I s this perhaps a Sigil problem?
Leonatus is offline   Reply With Quote