Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2010, 03:20 AM   #1
chengyibo
Member
chengyibo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2010
Device: sony reader
why font-size is not use in kindle

hello,dear friends,why the fllow display the same in kindle?
css:font-size:0.5em
font-size:1em

Best Regards,
chengyibo is offline   Reply With Quote
Old 10-28-2010, 06:42 AM   #2
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: 5,803
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
Because the mobipocket format does not understand CSS at all?
Jellby is offline   Reply With Quote
Old 10-29-2010, 08:52 AM   #3
chengyibo
Member
chengyibo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2010
Device: sony reader
give me a help?

could you give me the way to slove this
chengyibo is offline   Reply With Quote
Old 10-29-2010, 09:28 AM   #4
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: 5,803
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
Use something like this:

Code:
This font is normal <font size="+1">this is larger</font>, and <font size="-1">this is smaller</font>.
Jellby is offline   Reply With Quote
Old 10-29-2010, 12:17 PM   #5
chengyibo
Member
chengyibo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2010
Device: sony reader
thank you very much,Can I make friends for you?
chengyibo is offline   Reply With Quote
Old 11-07-2010, 04:13 PM   #6
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
The MOBI format and the Kindle do recognise some CSS. It's just kind of patchy. I just tested em values for the CSS font-size property, and they seemed to work properly - when I used 1em I got the same size as the default text, and when I used 0.5em the text was substantially smaller.
(See attached screen shot.)


- Donna
Attached Thumbnails
Click image for larger version

Name:	fontsize.jpg
Views:	198
Size:	15.7 KB
ID:	60806  
DMSmillie is offline   Reply With Quote
Old 11-08-2010, 04:32 AM   #7
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: 5,803
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
Quote:
Originally Posted by DMSmillie View Post
The MOBI format and the Kindle do recognise some CSS.
It's probably not the MOBI format or Kindle, but the program you use to convert the initial HTML+CSS into MOBI. What the MOBI format actually supports is <font size="-1"> (relative) or <font size="3"> (absolute).

Last edited by Jellby; 11-08-2010 at 04:35 AM.
Jellby is offline   Reply With Quote
Old 11-19-2010, 03:41 AM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,015
Karma: 10499963
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by DMSmillie View Post
The MOBI format and the Kindle do recognise some CSS. It's just kind of patchy. I just tested em values for the CSS font-size property, and they seemed to work properly - when I used 1em I got the same size as the default text, and when I used 0.5em the text was substantially smaller.
(See attached screen shot.)


- Donna
Ditto. (Hi, Donna!--Hitch waves...nice to see you on a civilized forum! Kids, Donna knows her Fu).

I've had good luck with using ems, and it translates nicely across multiple platforms, since I make all my books from ePUBs first with both "normal" css and an ADE xpgt template for fun. (har).

HTH,

Hitch
Hitch is offline   Reply With Quote
Old 11-19-2010, 05:10 PM   #9
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
(Hi Hitch! )

Heh... thank you kindly for those nice words, Hitch, but last few days I've been finding out more stuff I didn't know. There's always more, isn't there?

When I've been able to, I've been poking around with mobiunpack.py and a few other things, and Jellby is quite right - all of the CSS in the HTML used to create a mobi file gets turned into basic and/or proprietary HTML inside the mobi file by Kindlegen.

For example:

Code:
<p style="text-indent:0.3in">Paragraph with first line indent 0.3in.</p>
<p style="text-indent:5em">Paragraph with first line indent 5em.</p>
<p style="font-size:0.5em">Paragraph with font size 0.5em.</p>
<p style="font-size:16pt">Paragraph with font size 16pt.</p>
<p style="margin-left:0.5in;margin-top:12pt;margin-bottom:12pt">Paragraph with left margin 0.5in, and 12pt space before and after.</p>
<p style="margin-left:20%;margin-top:3em;margin-bottom:20px">Paragraph with left margin 20%, 3em space before and 20px space after.</p>
becomes:

Code:
<p width="29">Paragraph with first line indent 0.3in.</p> 
<p width="5em">Paragraph with first line indent 5em.</p> 
<p><font size="-3">Paragraph with font size 0.5em.</font></p> 
<p><font size="5">Paragraph with font size 16pt.</font></p> 
<p height="16"><blockquote>Paragraph with left margin 0.5in, and 12pt space before and after.</blockquote></p>
<div height="16"></div> 
<p height="3em"><blockquote>Paragraph with left margin 20%, 3em space before and 20px space after.</blockquote></p>
<div height="20"></div>
Seems like a major rewrite of the MOBI format will be needed for it to accommodate CSS properly. On the up side, it makes it a lot easier to figure out what CSS (in the input file) will work - if you can figure a way of doing essentially the same thing in HTML 3.2 (plus the proprietary use of "height" and "width" attributes in the <p> tag, and the proprietary <mbpagebreak/> tag), then it'll probably work. If there's no way of doing it with HTML 3.2, it probably won't. grrrrrrr!

- Donna
DMSmillie is offline   Reply With Quote
Old 11-20-2010, 02:01 PM   #10
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 1,742
Karma: 1643110
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
The HTML tags that are supported are documented on the Mobipocket site: http://www.mobipocket.com/dev/articl...eFolder=prcgen
susan_cassidy 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
Font-size problem, Kindle 2 hkdorama Kindle Formats 2 11-07-2010 03:57 PM
Can't change font or font size in ereaders jmacg Sigil 30 10-23-2010 09:21 PM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 09:47 AM
Changing of font size on PDF for Kindle DX iggysprint Amazon Kindle 9 06-10-2009 04:01 AM
kindle 2 font size jump Sonist Amazon Kindle 2 02-26-2009 12:32 PM


All times are GMT -4. The time now is 11:47 PM.


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