|
|
#1 |
|
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,663
Karma: 26165759
Join Date: Nov 2006
Location: UK
Device: Kindle Touch, PW, Fire HD, iPad 3, iPhone 4, Samsung Tab 2 7 + More
|
Line indents using "<div>" tags
I know that there are Mobi-specific parameters that one can add to a <p> tag to define the indentation of the line, but is there any equivalent (eg inline CSS) that can be used to achieve the same thing with a <div> tag? My aim here is to be able to specify additional indentation for specific lines of poetry. Thanks!
__________________
Harry Currently proofreading The Poison Belt, by Sir Arthur Conan Doyle. |
|
|
|
|
|
#2 |
|
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,034
Karma: 2422819
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Here are 2 examples of the div tag that I got from Mobipocket. The style attribute works even though it's not listed as supported attribute.
<div style="border: 1px solid black; background-color: gray;"> </div> <div align="center" bgcolor="#FFEBD6"> </div> Here is a link to info on the div tag (not all will work in Mobipocket): http://www.w3schools.com/tags/tag_DIV.asp I think it might be best to put each line of poetry in its own set of tags. If you need more indentation, I would recommend using (the non breaking space character). This will adjust better when changing the font size.
__________________
The Digital Reader blog - www.the-digital-reader.com |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Mobile Reader Geek
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34,224
Karma: 13801376
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad
|
Create the CSS and use <div class="classname">text</div>
__________________
|
|
|
|
|
|
#4 |
|
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,034
Karma: 2422819
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
I'd also recommend that you not try anything too complicated. Tag support is hit or miss in Mobipocket-particularly the older versions.
I'd be willing to test it for you if you want.
__________________
The Digital Reader blog - www.the-digital-reader.com |
|
|
|
|
|
#5 |
|
Mobile Reader Geek
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34,224
Karma: 13801376
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad
|
Mobipocket Creator (publisher edition) will convert the CSS and tags into it's normal mess.
__________________
|
|
|
|
|
|
#6 |
|
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,034
Karma: 2422819
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
I meant to say Mobipocket Reader. Thanks for catching it.
__________________
The Digital Reader blog - www.the-digital-reader.com |
|
|
|
|
|
#7 | |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,144
Karma: 2505637
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
Quote:
Personally, I use <p> for poetry lines (as for normal paragraphs). For each line I have <p height="0em" width="2em">, and I change the 0 and 2 if needed. |
|
|
|
|
|
|
#8 |
|
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,663
Karma: 26165759
Join Date: Nov 2006
Location: UK
Device: Kindle Touch, PW, Fire HD, iPad 3, iPhone 4, Samsung Tab 2 7 + More
|
Thanks to all for the suggestions.
Presumably it would be best to use an "em" spacing, since this should scale with the font size, whereas "px" or "pt" won't? I'll do some experiments and see what works best.
__________________
Harry Currently proofreading The Poison Belt, by Sir Arthur Conan Doyle. |
|
|
|
|
|
#9 |
|
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,663
Karma: 26165759
Join Date: Nov 2006
Location: UK
Device: Kindle Touch, PW, Fire HD, iPad 3, iPhone 4, Samsung Tab 2 7 + More
|
Using <div width="1em"> works beautifully! Thanks very much for the assistance.
__________________
Harry Currently proofreading The Poison Belt, by Sir Arthur Conan Doyle. |
|
|
|
|
|
#10 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,144
Karma: 2505637
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
My pleasure. Now you can get rid of all the for indents
|
|
|
|
|
|
#11 |
|
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,955
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Oh, that's just a BD affliction...
__________________
-Nick ‹The REB1200 Guy› |
|
|
|
|
|
#12 |
|
Mobile Reader Geek
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34,224
Karma: 13801376
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad
|
The eBook I converted to ePub today uses a hanging indent and it works very well.
Code:
.calibre_class_17 {
margin-top: 0%;
text-indent: -3%;
margin-left: 3%
}
__________________
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Defining Metadata with "calibredb add" command line function. | macr0t0r | Calibre | 3 | 03-01-2012 07:36 PM |
| How to reduce indents without "removing space between paragraphs" | Skydog | Calibre | 5 | 06-05-2010 12:58 AM |
| pdf "3rd pass pages" and line numbers | mattgi | Calibre | 1 | 01-26-2010 09:23 PM |
| "subtree mode" and tags in madshelf - really used? | dottedmag | OpenInkpot | 19 | 06-05-2009 12:10 PM |
| iLiad "joe" command line text editor | bobj | iRex Developer's Corner | 3 | 06-02-2008 03:03 PM |