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 10-05-2012, 12:47 PM   #1
curiousgeorge
Connoisseur
curiousgeorge began at the beginning.
 
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>
curiousgeorge is offline   Reply With Quote
Old 10-05-2012, 06:11 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
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.
Tex2002ans is offline   Reply With Quote
Old 10-06-2012, 04:43 AM   #3
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Tex2002ans View Post
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.
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.
Jellby is offline   Reply With Quote
Old 10-06-2012, 05:37 AM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Jellby View Post
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.
Hmm I see. Thank you for the clarification... Guess I should have read those wikis more closely as well.
Tex2002ans is offline   Reply With Quote
Old 10-06-2012, 09:16 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,657
Karma: 127838196
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.
JSWolf is offline   Reply With Quote
Old 10-07-2012, 03:36 AM   #6
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
Never use a percent for an indent because the size of the indent will change based on the size of the screen.
So what? It won't change with font size, and maybe that's what the creator wants.

Quote:
Em is appropriate because it won't change based on the screen size.
But it will change with font size, and depending on the screen/font ratio it may be too large or too small.

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.
Jellby is offline   Reply With Quote
Old 10-09-2012, 12:28 PM   #7
curiousgeorge
Connoisseur
curiousgeorge began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
Quote:
Originally Posted by Tex2002ans View Post
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.
thanks for the info. This was an ebook I was correcting for someone and Ive never used ems before but was under the impression they were used for font height


Quote:
Originally Posted by Jellby View Post
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.
thanks for the validation


Quote:
Originally Posted by JSWolf View Post
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.
well the em is not approaiate because the ebook will not validate based on the em indent


Quote:
Originally Posted by Jellby View Post
So what? It won't change with font size, and maybe that's what the creator wants.



But it will change with font size, and depending on the screen/font ratio it may be too large or too small.

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.
thanks for the post
curiousgeorge is offline   Reply With Quote
Old 10-09-2012, 03:38 PM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,464
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by curiousgeorge View Post
well the em is not approaiate because the ebook will not validate based on the em indent
What validator are you using? Whether or not you use ems is completely up to you, but em indents certainly shouldn't have any validation issues.
DiapDealer is offline   Reply With Quote
Old 10-09-2012, 07:33 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,657
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by curiousgeorge View Post
well the em is not appropriate because the ebook will not validate based on the em indent
It will validate using em. What validation program are you using that's buggy enough to not validate valid code?

Code:
text-indent: 1.2em;
That is 100% valid CSS in ePub.
JSWolf is offline   Reply With Quote
Old 10-10-2012, 09:40 AM   #10
curiousgeorge
Connoisseur
curiousgeorge began at the beginning.
 
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>
curiousgeorge is offline   Reply With Quote
Old 10-11-2012, 12:16 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,657
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by curiousgeorge View Post
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>
That's not even valid code.
JSWolf is offline   Reply With Quote
Old 10-22-2012, 02:56 PM   #12
curiousgeorge
Connoisseur
curiousgeorge began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
I know thats not valid code.
curiousgeorge 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
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


All times are GMT -4. The time now is 05:37 PM.


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