coderef

Page selectorsLimited availability

The :first, :left, and :right pseudo-classes select pages based on their position in sequence after pagination.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–17Not supported
18+Supportedsince Mar 28, 2012
Current: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
1–5.1Not supported
6+Supportedsince Jul 25, 2012
Current: 27
MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–5Not supported
6+Supportedsince Sep 10, 2012
Current: 27

How to use

Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: :first.

Feature detection

CSS · check before using
@supports selector(:first) {
  /* styles that use :first */
}

/* or in JavaScript */
if (CSS.supports("selector(:first)")) {
  // use it
}

Sub-features

Support for each part of the feature (3). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
first18121166181166
left612✕518✕4.2
right612✕518✕4.2