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 09-05-2010, 03:10 AM   #1
shall1028
Zealot
shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.shall1028 puts his or her pants on both legs at a time.
 
shall1028's Avatar
 
Posts: 148
Karma: 133978
Join Date: Jun 2010
Device: Kobo
Image background in CSS not displaying on Kobo

I have created my own epub version of "The Book of Tea" and am having troubles with chapter headings. What I intend is the chapter number (in Roman numerals) followed by its text and a period (e.g. II. The Schools of Tea.) over-top of a decorative underline (a GIF file).

The textual parts view fine in Sigil, ADE and Calibre and on my Kobo reader. The underline is present except on the Kobo.

The CSS for the header is:

Code:
#content h3 {
	text-transform: uppercase;
	text-align: center;
	margin: 1.5em 0 1.5em 0;
	font-size: 1.8em;
	line-height: 1.5em;
	letter-spacing: .1em;
	padding-bottom: 0.75em; /* space between text and image */
	background: url('../Images/underline.gif') no-repeat bottom center;	
}

#content h3:after {
	content: "." 
}
and the epub file is attached.

I have searched and can find no exceptions to epub specs saying that the background: url... doesn't work on Kobo.

For those who might be willing to help:

1) does the underline display on other devices?
2) any thoughts about how to get the Kobo to display the underline?
3) or...?

Thanks,
Steven
Attached Files
File Type: epub Book of Tea.epub (193.5 KB, 109 views)
shall1028 is offline   Reply With Quote
Old 09-05-2010, 04:05 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: 6,195
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
"text-transform", "letter-spacing" and "content" are not included in the ePUB specification, so if any reader supports them it's just a bonus, and you should actually count on their not being supported. If case and period are important, write the "II." directly.
Jellby is offline   Reply With Quote
Old 09-05-2010, 07:30 AM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
You could try h3 with a left margin in % or pts so it remains invariant with font size and then use a very slightly larger left margin (also in % or pts) for a separate img carrying the underline gif. Varying the line-height on the img should give you enough control on its vertical position.
e.g.
<h3 class="chaphead">...</h3>
<div class="ornament"><img src="underline.gif" alt="" class="underlineimg"</img></div>

h3 {
margin-left: 35%; <-- alter to suit
...
}
.ornament {
margin-top: 0;
margin-left: 37%; <--alter to suit
vertical-align: top;
line-height: 0.5; <--alter to adjust vertical spacing
}

It's fiddly though, and This sort of fine-grained positional control not really supported by the css subset used in the epub standard. Might be easier just to render your chapter headings as images and embed those.
charleski 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
Standard CSS for Kobo? CazMar Sigil 5 09-24-2010 04:47 PM
Kobo screen flashing when plugged in but no image! Weblady Kobo Reader 2 05-11-2010 08:27 PM
Image of Kobo beside Ebookwise 1150? guyanonymous Kobo Reader 6 05-10-2010 09:21 PM
css, non-repeating background image ckirchho ePub 3 06-26-2009 04:35 AM
Pdf background darker than LRF/RTF background LOL2005 Sony Reader 2 10-23-2007 11:00 AM


All times are GMT -4. The time now is 07:15 PM.


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