View Single Post
Old 02-26-2011, 05:02 AM   #90
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by theducks View Post
Way too much code

in the css
Code:
.firstpara { text-indent: 0 }
Now in your book
just ADD firstpara AFTER the calibre10
Code:
<p class="calibre10 firstpara">Ipsum ...</p>
[B]Cascade[/
B], use it or lose it
All yo did was change a single attribute. and tack that OVER the base style
your solution, as given does not work - tested on several books. I am having to also define the line spacing in the noindent class

e.g. this css does not cascade the line spacing - it still defaults to 1em for my (now not indented) 1st para. .description 1 is the para style in this instance - so I add your noindent code immediately afterwards like so:

.description1 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0.3em;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-indent: 1em
}
.noindent {text-indent: 0}

it works only if I add another line to noindent like so
.noindent {
margin-bottom: 0.3em;
text-indent: 0}
book code
Code:
<br class="calibre6" /></h2>

  <p class="noindent"><span class="none">Randy left the house in time to see Missouri wedge herself under the wheel of the Henrys' Model-A Ford, an antique -so certified with a "Q" tag issued by the state-but kept in perfect running order by Malachai's mechanical ingenuity. "I haven't finished but I got to go now," she said. "Mrs. McGovern, she holds the clock on me. I'll be back tomorrow."</span></p>

  <p class="description1"><span class="none">The Model-A, listing to port with Missouri's weight, bounced down the pebbled driveway. Randy got into his new Bonneville. It was a sweet car, a compromise between a sports job and a hardtop, long, low, very fast, .and a lot of fun, even though its high-compression engine drank premium fuel in quantity.</span></p>
that is easy to do - but my understanding of css cascade rules says it should have worked without that extra line - tested, as I say on several different books

can you explain this please.
is it because the preceeding style to noindent ( in the book html, is calibre6, which inherits from calibre5 which inherits... - do I have to backtrack up that structure and/or place the .noindent definition elsewhere in the css ?

Last edited by cybmole; 02-26-2011 at 05:05 AM.
cybmole is offline   Reply With Quote