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 03-02-2011, 02:02 PM   #1
luthar28
Enthusiast
luthar28 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jul 2010
Device: Kindle
ePub not using CSS

Okay, I'm pulling out my hair. For some reason, my latest conversion isn't registering the CSS. I've even copied and pasted the CSS from a successful conversion into this one...removed every chunk I could find...blah, blah...can't find the error.

Hell, the thing even validates just fine.

But when I open it in Sigil, for instance, the style sheet has only one entry. Plus, instead of the thirty chapters, it's only been spliced into 3 sections (and I can't even figure out what sets those three sections apart).

I know this is a very broad question -- but does anyone have any ideas of what I might've done wrong?
luthar28 is offline   Reply With Quote
Old 03-02-2011, 02:18 PM   #2
luthar28
Enthusiast
luthar28 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jul 2010
Device: Kindle
And here's the CSS I'm using:

<style type="text/css" media="screen"><!--

img.sgc-1 {width:300px;
max-width:100%;}

.backcover {
height: auto;
max-width: 100%;
width: 600px;}

h3 {display: block;
font-size: 2em;
font-weight: bold;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
margin-top: 0.83em;
page-break-before: always;
text-align: center;
font-family: sans-serif;}

h3.Chapter {
text-align: right;
}

img.czp {
height: auto;
margin-top: 2em;
max-width: 40%;
width: 100px;
margin: auto;
}

.center1 {
display: block;
margin-bottom: 0;
margin-left: auto;
margin-right: auto;
margin-top: 0;
text-align: center;
}

p.chizine-body-indent- {
display: block;
font-size: 1em;
margin-bottom: 0.3em;
margin-left: auto;
margin-right: auto;
margin-top: 0.3em;
text-align: left;
text-indent: 25pt;
}

.spacer {
display: block;
margin-bottom: 1.2em;
}

p.chizine-body-no-indent- {
display: block;
font-size: 1em;
margin-bottom: 0.3em;
margin-left: auto;
margin-right: auto;
margin-top: 0.3em;
text-align: left;
text-indent: 0pt;}

.smaller {
font-size:85%;
}
.pagebreak {
display: block;
page-break-before: always;
}



--></style>
luthar28 is offline   Reply With Quote
Advert
Old 03-02-2011, 02:43 PM   #3
EowynCarter
Wizard
EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.
 
Posts: 4,332
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
Mmm, conversion ?
From what format ? To what format ? With what software ?
EowynCarter is offline   Reply With Quote
Old 03-02-2011, 02:44 PM   #4
luthar28
Enthusiast
luthar28 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jul 2010
Device: Kindle
Quote:
Originally Posted by EowynCarter View Post
Mmm, conversion ?
From what format ? To what format ? With what software ?
Straight HTML into ePub using Calibre. I know that often times one incorrect tag can cause real problems. But I just cannot spot what I've done wrong!

Is there another html to ePub conversion program?
luthar28 is offline   Reply With Quote
Old 03-02-2011, 06:10 PM   #5
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
I take it you've used the MEDIA attribute before without any problem? I haven't had any reason to use that so don't know one way or the other, but wondering if Calibre might be barfing on it?
DMSmillie is offline   Reply With Quote
Advert
Old 03-02-2011, 07:00 PM   #6
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Upload your CSS file to Here to check is anything is wrong...
Adjust is offline   Reply With Quote
Old 03-02-2011, 08:47 PM   #7
luthar28
Enthusiast
luthar28 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jul 2010
Device: Kindle
Quote:
Originally Posted by Adjust View Post
Upload your CSS file to Here to check is anything is wrong...
Cool page. I've bookmarked it for future reference.

However, my CSS came back clean. No ideas.

I created the ePub using Sigil (I honestly didn't know I could create one...I thought it was only for editing) and it displays just fine. Really wish I knew what the heck went wrong with Calibre though. Very bizarre.
luthar28 is offline   Reply With Quote
Old 03-02-2011, 09:05 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,763
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
<style type="text/css" media="screen"><!--

< style stuff snipped>

--></style>

Because those marks mean ? (test at 6 )

The stuff between is a COMMENT
theducks is online now   Reply With Quote
Old 03-02-2011, 09:54 PM   #9
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
That's standard practice when coding a web page - stops the browser trying to interpret the CSS as HTML (though I suspect that's only something that's an issue for older browser versions). However, yes, it might well be worth removing the comment tags when coding for an ebook.
DMSmillie is offline   Reply With Quote
Old 03-03-2011, 08:43 AM   #10
luthar28
Enthusiast
luthar28 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jul 2010
Device: Kindle
Quote:
Originally Posted by theducks View Post
<style type="text/css" media="screen"><!--

< style stuff snipped>

--></style>

Because those marks mean ? (test at 6 )

The stuff between is a COMMENT
You know it *will* be something like that...but sadly that's not the case. Hell, I've even tried linking to an external sheet but the same thing. I just can't figure it out. I remember this happened to me once before it was because there was an undeclared id tag (the whole document was wrapped in ID tag).
luthar28 is offline   Reply With Quote
Old 03-03-2011, 09:01 AM   #11
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Have you tried removing media="screen"? And you are placing the whole <style> stuff inside the <head>, aren't you?

Proceed little by little. For instance, use this:

Code:
<style type="text/css">
body { color: red }
</style>
see if it works, and if it does, start adding things one by one, until you find the culprit.
Jellby is offline   Reply With Quote
Old 03-03-2011, 09:55 AM   #12
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Quote:
Originally Posted by Jellby View Post
Have you tried removing media="screen"?
Thanks Jellby.

/me starts to wonder if Jellby is the only one who can see her posts in this thread...!
DMSmillie is offline   Reply With Quote
Old 03-04-2011, 11:25 AM   #13
luthar28
Enthusiast
luthar28 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jul 2010
Device: Kindle
Quote:
Originally Posted by DMSmillie View Post
Thanks Jellby.

/me starts to wonder if Jellby is the only one who can see her posts in this thread...!
I wasn't trying to be rude --just forgot to comment on it. Yes, that was the first thing I tried.

And as someone else suggested, I started removing every component, bit by bit and I was still getting the same result. I even started replacing it with components from successful conversions.

But I ended up making the ePub with Sigil, then doing a little manual correction of the TOC and the content.opf file and it's turned out great.

I really wish I knew what caused this for future reference...but no idea.
luthar28 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
epub CSS versus "Regular" CSS konrad ePub 4 02-18-2011 09:29 AM
Epub - CSS aufräumen ThR Erste Hilfe 0 02-07-2011 05:27 AM
EPUB (CSS) tweaker app Loccy Conversion 9 01-23-2011 10:22 PM
converting to epub with my css fbrzvnrnd Calibre 3 04-15-2010 02:46 AM
ePub to ePub - just replace CSS? ChristopherTD Calibre 21 02-11-2010 02:50 AM


All times are GMT -4. The time now is 03:54 PM.


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