10-05-2012, 12:47 PM | #1 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
Indent other than em
I was curious to know if you cant indent a set size in ems what is the better alternative to:
Code:
<p style="text-indent:1.5em;"></p> |
10-05-2012, 06:11 PM | #2 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I believe all of these units can be used:
http://www.w3schools.com/cssref/css_units.asp The most commonly used units are em, px, and % (same as em. 1em=100%, 1.5em=150%). In ebooks, using em is the recommended way. Also, hopefully you are aware of CSS styling instead of inline. More information can be found here: https://wiki.mobileread.com/wiki/CSS Using CSS is a much preferred method to styling web pages/books because it provides an easy one stop shop for the entire formatting of your book. |
10-06-2012, 04:43 AM | #3 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Percents and ems are only equivalent when they're used in font sizes (or in line-height, I believe). In margins, indents, widths, etc. they are two very different things. Percent values are measured relative to the container block's width (generally), while ems are referred to the current font size.
|
10-06-2012, 05:37 AM | #4 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
|
|
10-06-2012, 09:16 AM | #5 |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Never use a percent for an indent because the size of the indent will change based on the size of the screen. Em is appropriate because it won't change based on the screen size. 1.2em is a very good value to use. Not too little and not too much. 1em is too small and 1.5em is too much.
|
10-07-2012, 03:36 AM | #6 | ||
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Quote:
I prefer ems too (for me, that is, for the settings I use and for my taste, 1em is not too small), but let others test and decide for themselves. Just remind them that screen sizes can be changed (by changing device, or changing the screen orientation, or changing the margins), and that font sizes can be changed, so relative indents can change too. |
||
10-09-2012, 12:28 PM | #7 | ||||
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
Quote:
Quote:
Quote:
Quote:
|
||||
10-09-2012, 03:38 PM | #8 |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
10-09-2012, 07:33 PM | #9 | |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
text-indent: 1.2em; |
|
10-10-2012, 09:40 AM | #10 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
Found out why it was kicking out all indents. The client had wrote the .html file as
Code:
<p style="text-indent:1.5em;">text text<p>text text text<p>more text than</p> |
10-11-2012, 12:16 PM | #11 |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
10-22-2012, 02:56 PM | #12 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
I know thats not valid code.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with indent | mangosteen | Conversion | 0 | 07-19-2012 02:13 AM |
indent control | cybmole | Conversion | 18 | 02-18-2011 11:12 AM |
hanging indent | Oldpilot | Sigil | 2 | 11-13-2010 06:20 AM |
Too much left indent! | Barty | Amazon Kindle | 12 | 11-09-2010 02:43 PM |
Paragraphs and indent | mrmikel | Calibre | 33 | 01-10-2009 05:37 PM |