Forum How do I...?

page selectors for the n-th page

yet
2 @page {
8
9 @top {
10 content: flow(header);
12 }
13 }
14
15 @page:first {
16
17 @top {
18 content: flow(firstpage);
19 }
20 }

I am using the CSS above for having a custom header on the first page
of my PDF...works as it should.

Now we have the requirement that the document should contain a title
page in front. So instead of @page:first I would need something
like @page:second or @page:(n-th).

Is there something?
mikeday
You can do it by creating a new page group and selecting the first page of that:

<html>
<head>
<style>
@page main:first {
    @top { content: "First Page Header!" }
}
@page main {
    @top { content: "Remaining Pages Header!" }
}
h1 { page-break-before: always }
div.main {
    page: main;
    prince-page-group: start
}
</style>
</head>
<body>
<h1>Title Page</h1>
<div class="main">
<h1>First Page</h1>
<h1>Second Page</h1>
</div>
</body>
</html>