Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 12-14-2011, 09:42 AM   #1
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
CSS question

A project I am working on displays letters and quotations in smaller type and indented.

To show this I redefined <blockquote> in the CSS as follows:
Code:
blockquote {
margin-bottom:1em;
margin-top:1em;
margin-left:5em;
margin-right:0;
font-size:90%;
}
In addition I have defined a class:
Code:
.small{
font-size:90%;
}
In letters I like to show the salutation and signature with the first letter full cap and the remainder of the name in small caps.

If I leave the "font-size:90%;" in the <blockquote> the class="small" in the signature and elsewhere has no effect. If I remove the "font-size:90%;" from the <blockquote> the signature works fine. It seems that the <blockquote> definition cancels the class="small."

Is this normal (correct operation) or have I done something wrong?

Thanks
crutledge is offline   Reply With Quote
Old 12-14-2011, 01:20 PM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Where do you notice this behavior? In Sigil, ADE or on a reader? I know that the renderer of Sigil (Qtweb?) has some issues with certain CSS effects.
Toxaris is offline   Reply With Quote
Advert
Old 12-14-2011, 02:49 PM   #3
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
How are you using the class definitions (.small)?
susan_cassidy is offline   Reply With Quote
Old 12-15-2011, 06:36 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
In some systems there may be a minimum font size...
Jellby is offline   Reply With Quote
Old 12-15-2011, 08:30 AM   #5
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
After much fiddling and testing, I finally found a solution.

What I've been trying to do is to put a class="small" inside a class="small".

The blockquote has size adjustment and a span inside the blockquote with a size adjustment.

I the size adjustment is the same in both, the inside adjustment doesn't work.

If the inside adjustment is smaller than the outer, it works.

I hope this makes sense.
crutledge is offline   Reply With Quote
Advert
Old 12-15-2011, 08:35 AM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Is <blockquote><span></span></blockquote> allowed? I believe Flightcrew and EPUBCheck will complain about it.
Toxaris is offline   Reply With Quote
Old 12-15-2011, 12:52 PM   #7
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by Toxaris View Post
Is <blockquote><span></span></blockquote> allowed? I believe Flightcrew and EPUBCheck will complain about it.
Works fine with Sigil, ePub, and kindle,
crutledge is offline   Reply With Quote
Old 12-15-2011, 01:30 PM   #8
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
I may have misunderstood your question. Below is the code used and the attached image is the way it looks in the RS.
Code:
  <blockquote>
    <div class="noindent">
      M<span class="small">Y</span> D<span class="small">EAR</span> C<span class=
      "small">RAMPTON</span>:
    </div>

    <div>
      Wo to that weak digestion with which you already are acquainted. I have had a most violent
      attack and though, as you know, I am probably the most interested in the experiment this
      evening, it will be impossible for me to be present. Please explain for me.
    </div>

    <div class="i10">
      Hastily and very cramped,
    </div>

    <div class="i14">
      G<span class="small">USTAV</span> S<span class="small">VEND</span>.
    </div>
  </blockquote>
Attached Thumbnails
Click image for larger version

Name:	demo.jpg
Views:	300
Size:	68.9 KB
ID:	79977  
crutledge is offline   Reply With Quote
Old 12-15-2011, 02:59 PM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Ah, but here the span is in a div. That is something else.
Toxaris is offline   Reply With Quote
Old 12-16-2011, 10:20 AM   #10
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I believe you can have <span> directly under <blockquote>. It doesn't need a <p> or <div> in the middle, though it does not hurt either, and it helps keeping everything well structured.

So, your problem was that this:

Code:
<blockquote class="small">
<span class="small"></span>
</blockquote>
does not result in a "twice small" text? I think it should, i.e., relative font sizes should be cumulative.
Jellby is offline   Reply With Quote
Old 12-16-2011, 11:56 AM   #11
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by Jellby View Post
I believe you can have <span> directly under <blockquote>. It doesn't need a <p> or <div> in the middle, though it does not hurt either, and it helps keeping everything well structured.

So, your problem was that this:

Code:
<blockquote class="small">
<span class="small"></span>
</blockquote>
does not result in a "twice small" text? I think it should, i.e., relative font sizes should be cumulative.
I fully agree. But it doesn't seem to work thar way.
crutledge is offline   Reply With Quote
Old 12-16-2011, 12:04 PM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Actually, the best solution is to use an embedded font and one that also has a small caps. Sure this won't work for Mobipocket, but it will work for ePub.

If you like, I can post the small cap version of Charis SIL that will work fine. Then you don't need to bother with the second font size as the small cap will be the right size.
JSWolf is offline   Reply With Quote
Old 12-16-2011, 12:41 PM   #13
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
For small-caps, I just ignore ADE. They're usually not that important, and I don't want to add that kind of code to something that's pretty basic, it kills everything good about CSS.

If I want make sure they are displayed differently, I add some conditional CSS, which are only recognized by ADE, to make small-caps bold instead (for instance).
Jellby is offline   Reply With Quote
Old 12-16-2011, 06:18 PM   #14
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by Jellby View Post
For small-caps, I just ignore ADE. They're usually not that important, and I don't want to add that kind of code to something that's pretty basic, it kills everything good about CSS.

If I want make sure they are displayed differently, I add some conditional CSS, which are only recognized by ADE, to make small-caps bold instead (for instance).
I just checked again, and my method works fine with ADE.
crutledge is offline   Reply With Quote
Old 12-17-2011, 03:32 AM   #15
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Yes, it works, but you are using "fake" small-caps with some ad-hoc manual coding, when the rational approach would be:

Code:
<span class="smallcaps">My Dear Crampton</span>:

span.smallcaps {
  font-variant: small-caps;
}
much more maintainable and cleaner. The problem is it doesn't work in ADE, but that's ADE's problem and bug, and I won't degrade the coding to satisfy ADE, at least for something that's not essential.
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Question for the CSS experts out there... Japes Calibre 2 06-23-2011 11:12 PM
CSS Question AppleTard Calibre 1 06-12-2011 12:07 AM
Question for the CSS experts crutledge Sigil 8 06-10-2011 04:13 PM
stupid question about epub? (nook + css) hapax legomenon ePub 0 10-31-2010 03:35 AM
A question about CSS: widows and orphans Jellby ePub 5 08-31-2009 03:54 PM


All times are GMT -4. The time now is 01:45 AM.


MobileRead.com is a privately owned, operated and funded community.