Is it possible to select a page based on class (e.g. '@page colophon')

Comments

2 comments

  • Avatar
    Jens Rutschmann

    Hi Guy,

    your CSS misses the link between the page definition from the template designer and the 'CSS named page'.

    For example if you used the template designer to create your colophon page with the CSS class 'colophon' you'll need this:

    div.intro-page.titlepage,
    div.intro-page.colophon {
    page: my-portrait-page;
    }

    This tells the renderer that you want the title and colophon pages formatted with the layout for the CSS named page 'my-portrait-page'.

    Then also define this CSS named page:

    @page my-portrait-page {
    size: A4 portrait;
    }

     

    You should add the named page definition in front of the assignment:

    @page my-portrait-page {
    size: A4 portrait;
    }

    div.intro-page.titlepage,
    div.intro-page.colophon {
    page: my-portrait-page;
    }

     

    Let us know if that helped. 

     

    Cheers,
    Jens

     

    0
    Comment actions Permalink
  • Avatar
    Guy Eden

    Hi Jens,

     

    That works perfectly!

     

    Thanks,

     

    Guy.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk