Adjusting margins for left and right chapter pages (but not front or end matter)


I’m using custom CSS on the McLuhan theme, and I’d like to adjust the margins for chapter pages (i.e. specify different margins for right and left facing pages).

I understand that I can use @page to specify different margins for left and right pages across an entire book but I am not sure how to limit this style to actual chapters only. Right now if I apply specific margins using @page it adjusts the margins on the title page, ToC etc, which I would prefer to avoid.

Is it necessary to create a @page group and then apply that group to the chapter (or ugc) div class? Or is there an easier way to achieve this that I am totally missing?


Hi @daveydream, you can target using @page chapter {}. Here’s the full set of named pages:

@page before-title {}
@page halftitle-page {}
@page title-page {}
@page epigraph {}
@page dedication {}
@page copyright-page {}
@page toc {}
@page front-matter {}
@page introduction {}
@page part {}
@page chapter {}
@page back-matter {}

You can also add combinations of :left, :right, :first, or :blank to these, e.g.:

@page chapter:first:right {
  /* Style the first page of a chapter on the right side. */

Hope this helps!


that´s good information for a snipet

1 Like

Thanks a lot Ned, this is really very helpful indeed. Much appreciated!

1 Like