08-05-2011, 05:53 AM | #16 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
The reason you're having a problem is you don't have a margin-top specified on the p selector, so the default margin is what's being used, which is larger than .2em. If you were doing a conversion the look and feel options I mentioned before would fix this, but I suspect that you didn't actually attempt to convert the document to mobi/ePub...
Try this: Spoiler:
The new line is margin-top:0.2em; |
08-05-2011, 07:44 AM | #17 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Aug 2011
Device: Kindle
|
Quote:
Your suspicion that I didn't actually attempt to convert the document to .mobi is incorrect; I spent a day of bloody sweat doing it over and over and over and over and over and over and over and over and over again yesterday (I've left off a few 'overs' there). I finally got it working (well enough for a beginning - it was showing a title page with an author, a contents list, and chapters sized up more or less correctly) by pasting in this code from another document that was working (also well enough for a beginning): Code:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <head> <style type="text/css"> html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dd, dt, p, pre, table, th, td, tr, {margin: 0; padding: 0em; } p { text-indent: 1.5em; margin-bottom: 0em; line-height: inherit; } p.chapter { text-indent: 1.5em; font-weight: bold; font-size: 2em; page-break-before: always; margin-top: 5em; margin-bottom: 2em; } p.centered { text-indent: 0em; text-align: center; } p.title { text-indent: 0em; text-align: center; font-weight: bold; font-size: 4em; page-break-before: always; margin-top: 5em; margin-bottom: 2em; } p.author { text-indent: 0em; text-align: center; font-weight: bold; font-size: 3em; margin-top: 0em; margin-bottom: 2em; } </style> </head> <body> <p class="title">Onward to Mehico</p> <p class="author">by XX Ejico</p> <p class="chapter">Burning questions</p> <p>THE FOLLOWING DAY a call was put through to Seamus‘ desk. “Is that Seamus Murphy?”</p> <p>“This is DI Jordan. Who‘s speaking?”</p> </p></body> The first set of styles looked fine when opened in a web page, but showed the title and chapter as the same size as the rest of the text when converted to .mobi using Calibre. Thank you for the tip about the margin-top line; I'll put that in anyway - but it doesn't seem to be the total cause of this particular problem. Thank you for your patient help. |
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents | taraboom11 | Sigil | 20 | 04-30-2011 11:18 AM |
Using Table of Contents | sammieb77 | enTourage Archive | 7 | 01-14-2011 08:01 PM |
Table of Contents | ucoa | Calibre | 1 | 01-07-2011 09:01 PM |
How to make a PDF table of contents work in epub | ajbrutico | Calibre | 3 | 09-26-2010 09:31 AM |
Help with my Table of Contents | Skylinefranc | Calibre | 0 | 03-19-2010 12:55 AM |