If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Cannot position :before or :after pseudo-elements with CSS "position"-property.

VERIFIED DUPLICATE of bug 238072

Status

()

Core
Layout: R & A Pos
VERIFIED DUPLICATE of bug 238072
13 years ago
13 years ago

People

(Reporter: Jesper Hermansen, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2

You cannot position a :before or :after pseudo-element with the CSS property
"position", even though it should be possible.
The example-page I made, should give you an impression. I'm trying to position
the :before-element in the top left corner and the :after-element in the bottom
right corner. :before has a red border, and :after has a green border.
In Opera, it seem to work.

Reproducible: Always
Steps to Reproduce:

Actual Results:  
The :before-element was positioned before the element.
The :after-element was positioned after the element.

Expected Results:  
Both the :before and :after-elements should be positioned as any element would
be positioned using for example:
  position: absolute;
  left: 10px;
  top: 3px;

Updated

13 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows XP → All
Hardware: PC → All
> You cannot position a :before or :after pseudo-element with the CSS property
> "position", even though it should be possible.

It was explicitly impossible in CSS 2.0.

CSS 2.1 changed this, but we haven't had a chance to update the code yet.

*** This bug has been marked as a duplicate of 238072 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE

Updated

13 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.