|  06-23-2014, 03:56 AM | #1 | 
| Wizard            Posts: 1,083 Karma: 11496771 Join Date: Mar 2013 Location: Guben, Brandenburg, Germany Device: Kobo Clara 2E, Tolino Shine 3 | 
				
				@page margin settings
			 
			
			I never really understood the functionality of margins, padding, borders in ebooks (for I don't know how the boxes are defined there - and didn't find anything in the www.). But I have often been wondering why the margins of ebook text often were very close to the edges of my reader, so that it almost became uncomfortable to read, despite of having the "body" settings in the css at: Code: margin-top: 5px; margin-bottom: 5px; margin-left: 5px; margin-right: 5px; Code: @page 
{
margin: 5px;
}Have no clue if this is formally correct, but: Lo! It worked: Now there was enough space there. | 
|   |   | 
|  06-23-2014, 04:13 AM | #2 | 
| Resident Curmudgeon            Posts: 80,727 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | 
			
			Actually, you don't need the bottom margin set. There's usually space between the bottm line and the bit at the bottom used by the Reader.
		 | 
|   |   | 
|  06-23-2014, 12:52 PM | #3 | 
| Addict            Posts: 244 Karma: 359054 Join Date: Nov 2012 Device: default | |
|   |   | 
|  06-23-2014, 04:37 PM | #4 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
 Anything following the previous block can set a TOP margin to get a wanted gap | |
|   |   | 
|  06-24-2014, 04:24 AM | #5 | 
| Wizard            Posts: 1,083 Karma: 11496771 Join Date: Mar 2013 Location: Guben, Brandenburg, Germany Device: Kobo Clara 2E, Tolino Shine 3 | 
			
			@DomesticExtremis: Thank you for the hint, but there appears: "Each box has a content area (e.g., text, an image, etc.) and optional surrounding padding, border, and margin areas." Does this mean - transposed to the use of ebook readers - that one can deliberately decide if he wants, for example, the margins of a text set by controlling the padding, border or margin box commands? Where would I have to assign the @page rule? That's what I do not understand. | 
|   |   | 
|  06-24-2014, 11:40 AM | #6 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
 Play with the values and see the results. IMHO The easy way to get a feel for the basic box model | |
|   |   | 
|  06-24-2014, 01:04 PM | #7 | |
| Addict            Posts: 244 Karma: 359054 Join Date: Nov 2012 Device: default | Quote: 
 More here. The box model can be applied to any block element, so that you can have different margins/padding/borders for paragraphs, blockquotes and other bits. You do not have to set an @page, and your e-reader my override/ignore it anyway. | |
|   |   | 
|  06-25-2014, 02:26 AM | #8 | |
| Wizard            Posts: 1,083 Karma: 11496771 Join Date: Mar 2013 Location: Guben, Brandenburg, Germany Device: Kobo Clara 2E, Tolino Shine 3 | Quote: 
  ). I didn't really understand, for example, how it works to make one paragraph extend wider than the other. I only tried some things, waiting for the effects, but it's of course better to understand the context. You are right: some things work, other do not. Lately, I transferred a book to the reader with the @page rule by Calibre, and the rule was ignored. By hasard, I had to delete this book, worked it up in Sigil (without changing the css), and fetched it to the reader again, and voilà: the margins had become nicer. The world is full of miracles. | |
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Removing margin settings from epub | treadlightly | Kobo Reader | 5 | 12-07-2013 08:58 PM | 
| Kobo Glo losing margin settings | antonf | Kobo Reader | 1 | 02-07-2013 05:01 PM | 
| Changing Margin Settings to use full width of the Screen??? | JBlyth | Kobo Reader | 9 | 07-05-2010 09:54 AM | 
| Changing Margin Settings to use full width of the Screen | JBlyth | Kobo Reader | 0 | 07-02-2010 10:31 PM | 
| Quick question! margin settings? | nick_f | Sony Reader | 15 | 02-20-2009 02:15 PM |