|
|
#1 |
|
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,836
Karma: 12759490
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Using the width attribute
HarryT commented that he used the width attribute for that purpose. This caught my attention. I suspect that both use the same method. I have tried using the width attribute and it has never worked for me. Example: <p width="-15">... <div width="-15">... I am obviously doing something wrong but haven't isolated my problem. Can someone point me in the right direction? Thanks, Charlie
__________________
Charlie 'Bene legere saecla vincere'. 'To read well is to master the ages' [Prof. Issac Flagg] |
|
|
|
|
|
#2 |
|
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,016
Karma: 2422819
Join Date: Apr 2007
Location: DC Metro area
Device: Airpanel 100, Jornada 720, Kindle, Smart Q7, Zelda has Sony 600 & 700
|
I just checked, and I'm using it the same way:
<p width="-20"> If you're checking your work in a browser, it won't show. The width attribute is nonstandard.
__________________
The Digital Reader blog - www.the-digital-reader.com |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,657
Karma: 26165759
Join Date: Nov 2006
Location: UK
Device: Kindle Touch, PW, Fire HD, iPad 3, iPhone 4, Samsung Tab 2 7 + More
|
Yes, it only shows up in the finished Mobi book. I generally use 1em for each "level" of indentation. That looks right to me, although others may of course feel otherwise.
I'm not using negative (hanging) indents, but positive ones. Eg, picking a little verse at random: Code:
Mary had a little lamb
its fleece was white as snow.
And everywhere that Mary went
the lamb was sure to go.
Code:
<div>Mary had a little lamb,</div> <div width="1em">its fleece was white as snow.</div> <div>And everywhere that Mary went,</div> <div width="1em">the lamb was sure to go.,</div>
__________________
Harry Currently proofreading The Poison Belt, by Sir Arthur Conan Doyle. |
|
|
|
|
|
#4 |
|
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,836
Karma: 12759490
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Nate,
Thank you very much. The browser is the way I test everything. Know of a good non-standard browser? ![]() Charlie
__________________
Charlie 'Bene legere saecla vincere'. 'To read well is to master the ages' [Prof. Issac Flagg] |
|
|
|
|
|
#5 |
|
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,016
Karma: 2422819
Join Date: Apr 2007
Location: DC Metro area
Device: Airpanel 100, Jornada 720, Kindle, Smart Q7, Zelda has Sony 600 & 700
|
I finally had time today to experiment, and I found a better way to do the hanging indent. Here is an example that works with MobiCreator and uses standards compliant attributes:
<style type="text/css"> p.hanging { margin-left:00; text-indent:-20; } </style> This code fragment is supposed to go in the file header (between the head tags). I stronly urge you to use it instead of the width attribute. P.S. It works in a browser, too.
__________________
The Digital Reader blog - www.the-digital-reader.com |
|
|
|
|
|
#6 |
|
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,836
Karma: 12759490
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Nate,
This way looks great. This will force me to learn style sheets as I've really had no need for them before. I assume that the code can be named and used as a Class attribute for <p> and <div>. By adjusting margin-left and text-indent, lines of poetry could be indented to various levels and any word wrap will be correct. You, sir, are an HTML expert. ![]() Charlie P.S. It beats the heck out of the poetry method in the book!!!
__________________
Charlie 'Bene legere saecla vincere'. 'To read well is to master the ages' [Prof. Issac Flagg] Last edited by crutledge; 07-05-2009 at 12:24 PM. |
|
|
|
|
|
#7 |
|
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,016
Karma: 2422819
Join Date: Apr 2007
Location: DC Metro area
Device: Airpanel 100, Jornada 720, Kindle, Smart Q7, Zelda has Sony 600 & 700
|
If you look over in the Advanced Ebook Formatting Tips thread, it turns out I was wrong about margin-left. It's ignored by MobiCreator. I'd still leave it in just in case you use the same source files to make another format which can use it.
__________________
The Digital Reader blog - www.the-digital-reader.com |
|
|
|
|
|
#8 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,822
Karma: 2831780
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS 650, Kindle3, iPad2, Sony PRS T1, Sony PRS T2
|
Quote:
Unless we check things like this we won't know whether the problems lie with Mobipocket as a format, or with Mobipocket Creator. Regards, Alex |
|
|
|
|
|
|
#9 |
|
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,657
Karma: 26165759
Join Date: Nov 2006
Location: UK
Device: Kindle Touch, PW, Fire HD, iPad 3, iPhone 4, Samsung Tab 2 7 + More
|
All you can do in a Mobi book is to set "global" margins for the entire book:
http://www.mobipocket.com/dev/articl...le=margins.htm You cannot vary the margins for specific parts of the book.
__________________
Harry Currently proofreading The Poison Belt, by Sir Arthur Conan Doyle. Last edited by HarryT; 07-06-2009 at 05:13 AM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Page Width | kobo2010 | Kobo Reader | 4 | 05-10-2010 08:14 PM |
| How to apply fixed-width fonts | EnergyLens | Calibre | 5 | 04-17-2010 12:41 PM |
| Error parsing attribute name? | seagull | Calibre | 1 | 01-01-2010 11:30 AM |
| Attribute error? | jusmee | Calibre | 2 | 12-15-2009 08:22 PM |
| Qs about the objid attribute | DanielCoffey | LRF | 1 | 06-29-2009 07:12 AM |