Opera Bug #CORE-22089

Opera mishandles an arcane section of the CSS2 specification regarding overflow on the root element

Fixed in Opera 12.0

This document has the CSS property overflow set to auto on the <html> element, and set to hidden on the <body> element. According to the W3C CSS2 specifications, the overflow value applied to the <body> element should override the root element, only if the overflow value of the root element is visible.

From the CSS2 specifications, section 11.1.1: Visual effects, Overflow and clipping, Overflow: (emphasis added)

UAs must apply the 'overflow' property set on the root element to the viewport. When the root element is an HTML "HTML" element or an XHTML "html" element, and that element has an HTML "BODY" element or an XHTML "body" element as a child, user agents must instead apply the 'overflow' property from the first such child element to the viewport, if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'. The element from which the value is propagated must have a used value for 'overflow' of 'visible'.

In this case, Opera treats a root element overflow value of auto the same as visible and allows the value applied to the <body> element (hidden) to apply to the viewport, hiding the scroll bars. In contrast, IE7, Firefox, Safari and Chrome all show a scrollbar on this page.


Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.

Pass if there is a scrollbar attached to the viewport.

Fail if there is no scrollbar.


Main Bug List