CSS :right pseudo-class

Definition and usage

CSS :right Pseudo-classes are used to select and set the styles for all right pages in the printed document.

Tip::right Pseudo-classes and @page rules Used together.

Note:The following properties can be used with :right Used together:

  • Margin properties
  • Padding properties
  • Border properties
  • Background properties

Example

Select all right pages for printing:

@page :right {
  margin-left: 40%;
  margin-top: 50%;

Try it yourself

CSS syntax

@page :right {
  CSS declarations

Technical details

Version: CSS3

Browser support

The numbers in the table specify the first browser version that fully supports this pseudo-class.

Chrome Edge Firefox Safari Opera
6 12 Not supported 5 9.2

Relevant pages

Reference:CSS :first pseudo-class

Reference:CSS :left pseudo-class