View Single Post
Old 03-15-2012, 01:47 AM   #2
Keroberos
Zealot
Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.
 
Keroberos's Avatar
 
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
Well first off here's a good site for getting all the basic ins and outs of CSS, http://www.w3schools.com/css/default.asp, lots of good info there (I still reference it from time to time if I can't remember something). And here's a good epub tutorial from right here on MR https://www.mobileread.com/forums/sho...d.php?t=130390.

For setting up font sizes, I'd start off just keeping it simple (no sizing in the CSS), If you use correct headings for everything it should all work pretty well together. If you want to start playing with sizes, I always leave the main body text at the default (it can be resized in the reader anyway), and use ems or percents for sizing anything that I want to be different (those two are relative sizing, so they will scale to the main text if the font size is changed in the reader).

For spacing things it all depends on what and where it is, if it's a chapter heading at the top of a page, I use px for the top margin (this is a fixed amount so it will not change if the font size is changed in the reader), for everything else it depends on what kind of look you want. Just remember that ems are relative sizing (changes based on the reader's font size settings) and px is a fixed size (doesn't change).

Between <div> and <blockquote> tags, either is OK, but if you use a <div> tag it needs additional styling in your CSS, whereas the <blockquote> tag spacing is handled by the reader device's rendering engine.

As long as you keep things fairly simple it should adapt to many different devices.
Keroberos is offline   Reply With Quote