CSS :right

The :right pseudo-class is used with @page in paged media. It selects right-hand pages, such as odd pages in left-to-right printed books.

Syntax

@page :right {
  margin-left: 3rem;
}

Example

@media print {
  @page :right {
    margin-left: 3rem;
    margin-right: 2rem;
  }
}
Result:

This affects print pagination. It is not the same as the right positioning property.

Important note

For element positioning, use the right property together with position. For printed page selection, use @page :right.