Forum How do I...?

Remove top margin from first element on a page

lcarey
Is is possible to make a rule to select the first element on a page?

Essentially I want something like: @page > :first-child{top-margin:0;}
mikeday
No, elements can't be selected based on where they appear on the page. However, elements that follow a natural page break should have their top margin removed automatically.
oliof
Can you define "natural page break"?

Cheers,
Harald
mikeday
One that isn't explicitly requested by a property like "page-break-after: always", one that just happens because the previous page was full.
oliof
Unfortunately, the same doesn't happen on column breaks.