Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-26-2012, 04:40 AM   #1
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977556
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Floats layered on top of floats

Is it possible to do this?

I have an image for a chapter head, and it uses a float left to wrap the text beside it. Is there any way to place a drop cap within that wrapped text?

When I use the usual drop-cap code -- a span which is styled in the CSS -- the letter simply disappears.

Maybe I'm wishing for the moon...
GrannyGrump is offline   Reply With Quote
Old 12-26-2012, 04:58 AM   #2
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Disappearing is not an effect I would expect. Maybe you can show your code.

It should be possible to have the drop cap next to the chapter head image, by using two floats (see http://css-tricks.com/all-about-floats/). Or, if you want the drop cap to apear in the same area as the image, you could get that by using relative positioning or altering the elements' size.
Jellby is offline   Reply With Quote
Old 12-26-2012, 06:16 AM   #3
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977556
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
well, now, don't I feel foolish!

Sigil makes my drop-cap invisible, also Calibre reader. There is just a blank square where it should show.

I just learned that ADE for desktop shows it.
I don't have my Sony reader with me, so can't check there, and I'm at work with no access to Sony Reader or any other pc reader apps.

So maybe it is a QT-webkit thing. I have got so used to Sigil always displaying valid formatting, so I don't know if this styling is on shaky ground.

The CSS for the image float is borrowed from your Tom Sawyer, the code for the drop-cap is pretty standard.

Code:
/* IMAGE FLOAT */
div.chapterhead img {
  width: 100%;
  max-width: 600px;
}
div.chapterhead div {
  text-align: left;
  margin: 0 3px 0 0;
}
div.chapterhead div.picture {
  width: 100%;
  max-width: 600px;
  height: 4em;
  margin: 0 0 -3em 0; 
  overflow: visible;
  text-indent: 0;
}
div.picture {text-indent: 0;}
div.chapterhead div.top,
div.chapterhead div.bottom {
  /* hide as much as possible */
  position: relative;
  z-index: -1;
  visibility: hidden;
  opacity: 0;
}
div.chapterhead div.top {
  float: none;
  width: 100%;
  margin-bottom: -1em;
}
div.chapterhead div.bottom {
  float: left;
  clear: both;
}
div#pt1ch01 div.bottom {
	width: 16.66%; /*100*/
max-width: 100px;
}

/* DROP CAP*/

.capLetter{
font-family: serif;
font-style: normal;
font-weight: bold;
font-size: 450%;
height: .9em;
float: left;
margin: -.15em 0.15em -.2em 0em;
}
span.leadmid {
margin-left: -.65em;
}


/*THE HTML */


<h4 class="disp0" id="p1c1">1. Burzee</h4>

<div class="chapterhead" id="pt1ch01">
<div class="picture">
<p class="ind0"><img alt="CHAPTER FIRST. Burzee" src="../Images/pt1ch01-a.jpg" /></p>
</div>a

<div class="top"><img alt="" src="../Images/auxt-ch01.png" /></div>

<div class="bottom"><img alt="" src="../Images/auxb-ch01.png" /></div>

</div>


<p><span class="capLetter">H</span><span class="leadmid">A</span>VE you heard of the great Forest of Burzee? Nurse used to sing of it when I was a child.</p>
GrannyGrump is offline   Reply With Quote
Old 12-26-2012, 12:06 PM   #4
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
I was noticing last week that the versions of QTWebKit that still supported QT 4.8 had a fair number of bugs where floating content is concerned. Current TOT QTWebKit as of last week was much closer to CSS spec compliance. Presumably, when Sigil adopts QT5 (released last week), a lot of those rendering problems will go away.
dgatwood is offline   Reply With Quote
Old 12-27-2012, 08:42 AM   #5
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
From the QT5 website:
In March 2011, Digia Plc. purchased the licensing and support rights of Qt from Nokia to better serve commercial desktop and embedded companies and developers. In September 2012 Digia acquired the full Qt business from Nokia. Digia is the only software house that can offer a one-stop shop for Qt development including licensing, support, training and services.

Digia, Qt works with the Qt Project and the Qt Community to ensure contributions and feedback to the rest of the Qt community.

Guess we can't complain about Nokia any more.
mrmikel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Floats, images, text-wrap --- need advice GrannyGrump ePub 11 09-06-2012 09:14 AM
Apple applies for patent for layered eink/lcd hybrid Dulin's Books News 37 04-12-2011 08:23 PM
Converting Layered? PDFs kerrware Calibre 2 06-30-2010 03:31 PM
Unutterably Silly Which Islander Floats YOUR Boat? GraceKrispy Lounge 35 08-28-2009 01:32 PM
Which Islander floats your boat? GraceKrispy Lounge 66 08-22-2009 06:50 PM


All times are GMT -4. The time now is 05:08 AM.


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