views:

69

answers:

2

I'm creating an epub file and am trying to understand an example css for an ebook:

@page { margin-top: 0.8em; margin-bottom: 0.8em;}

What's the @page selector? I can't find it in my books or Google.

Thanks,

Larry

+1  A: 

A page box is a rectangular region that contains two areas:

* The page area. This area includes the boxes laid out on that page. The edges of the page area act as the initial containing block for layout that occurs between page breaks.
* The margin area, which surrounds the page area.

We specify the size, margins, etc. of a page box within a @page rule.

The size of the page box is set with the size property. The size of the page area are the size of the page box minus the margin area.

Per this link to w3c schools

Matthew Vines
+1  A: 

@page describes how your document should behave on page-based media (like print). This should clear it up: http://www.w3.org/TR/CSS21/page.html

Dan