View Single Post
Old 09-25-2010, 03:44 AM   #6
droople
Connoisseur
droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.
 
droople's Avatar
 
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
Quote:
Originally Posted by theducks View Post
OMG what a mess of styles (even without seeing the stylesheet(s).. A MUST to see what each selector is calling for.)

Code:
 /* in the stylesheet. VERY SIMPLE */
h1.chapter {
display: block;
font-size: 150%
font-weight: bold;
font-style: normal;
text-align: center;
margin-top: 1em;
margin-bottom: 2em;
}

h1.chapteritalic { /*assume that this adds/changes an additional property of the enclosing selector */
font-style: italic;
}


/* in the document */

<h1 class="chapter"><span class="chapteritalic">The </span> Year <span class="chapteritalic">of</span>  Living Biblically</h1>
This way you get a 1st level TOC entry automagically with Sigil

The ability to tune the look and feel (size, stroke, position), from a single place, the style sheet
I really really dislike Calibre.....

This is the typical Calibre stylesheet

Code:
@namespace h "http://www.w3.org/1999/xhtml";
.bold {
    font-weight: bold
    }
.calibre {
    display: block;
    font-size: 1em;
    margin-bottom: 0;
    margin-left: 1pt;
    margin-right: 1pt;
    margin-top: 0;
    page-break-before: always
    }
.calibre1 {
    border-bottom: 0;
    border-top: 0;
    display: block;
    margin-bottom: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: 1.5em
    }
.calibre10 {
    color: #F00
    }
.calibre11 {
    font-size: 0.75em;
    line-height: normal;
    vertical-align: super
    }
.calibre12 {
    font-size: 0.75em;
    line-height: normal;
    vertical-align: sub
    }
.calibre2 {
    border-bottom: 0;
    border-top: 0;
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-align: justify;
    text-indent: 1.5em
    }
.calibre3 {
    font-size: 1.66667em
    }
.calibre4 {
    color: #231F20
    }
.calibre5 {
    display: block
    }
.calibre6 {
    font-size: 1.83333em
    }
.calibre7 {
    height: auto;
    vertical-align: baseline;
    width: auto
    }
.calibre8 {
    font-size: 1.125em
    }
.calibre9 {
    color: blue;
    cursor: pointer;
    text-decoration: underline
    }
.italic {
    font-style: italic
    }
.mbppagebreak {
    border-bottom: 0;
    border-top: 0;
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    page-break-after: always;
    text-indent: 1.5em
    }
And part of text code
Code:
<body class="calibre">
  <p class="calibre2"><span class="calibre4">For an hour, without pausing, he pontificates to this pretty blonde he's trying to pick up. She hears the following (as does everyone else):</span><br class="calibre5" />
  <span class="calibre4">"My one-man show</span> <span class="italic calibre4">Why Try</span> <span class="calibre4">is a dissertation on suicide," he announces. "It's very funny. I have a very funny mind. Death is funny. I haven't been to a funeral that I haven't laughed at."</span><br class="calibre5" />
droople is offline   Reply With Quote