Forum How do I...?

Get rid of headers in the first named page

marlonob
Hello!

I'm having trouble getting rid of headers and footers on the first page of chapters (defined by the <article> tag and using the name "articulo" for its pages definitions). I have tried with
@page articulo:first {
    @top-left {content: normal;}
    @top-right {content: normal;}
    @bottom-center{content: counter(page);}
   }

but with no luck. The element has a page-break-before: right; definition, but with or without page inserted, the headers and footers remain as defined in
@page articulo:right {…}
@page articulo:left {…}


Am I doing something wrong?

Thanks in advance for your help!
marlonob
I searched the forum more thoroughly, and found the answer. Turns out you have to add
prince-page-group: start;
to the element with the named page for Prince to apply the :first selector’s declarations. (source 1, source 2).

Sorry for the duplicate.
mikeday
You also need to specify "article { prince-page-group: start }" for the :first page class to apply, otherwise it only applies to the first page in the entire document.