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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-24-2010, 12:16 AM   #1
december
Nameless Being
 
CSS for a Kindle-like text formatting?

I apologize if this has already been asked, but does anyone have any suggestions for what CSS coding might produce an e-pub output most similar to the Kindle "default" (i.e., no spacing between paragraphs, and minimal indent - looks to be about three letters' worth of space?)

I'm going a little nuts here trying to replicate it, and am hoping that someone else might have gone this way before me. Thanks!
  Reply With Quote
Old 04-24-2010, 02:40 AM   #2
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
For no spacing between paragraphs use
Code:
margin-top: 0;
margin-bottom: 0;
applied to the tags that contain your paragraphs.

For small indents use something like
Code:
text-indent: 1em; //vary size "1em" to suit. can be decimal (eg: "0.9em")
and apply this also to your paragraph containing tags.
sherman is offline   Reply With Quote
Advert
Old 04-24-2010, 07:44 AM   #3
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Try this:

Code:
p 
{
   margin: 0; 
   padding: 0;
   text-indent: 1em;
}
Change the value of the text-indent to something else if 1em doesn't suit you. Personally, I always use 1.5em.
Valloric 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
Bidirectional text in XHTML/CSS Jellby Workshop 3 02-21-2010 01:28 PM
Text formatting jerrywojo Ectaco jetBook 4 01-19-2010 03:37 PM
text file formatting hobbyman Calibre 5 10-05-2008 05:18 PM
Text tool for formatting Gutenberg text files bob_ninja Workshop 5 11-13-2007 12:28 PM
PRS-500 Text Formatting Tool tesseract420 Sony Reader Dev Corner 5 09-13-2007 05:36 PM


All times are GMT -4. The time now is 04:25 PM.


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