Closed Bug 268062 Opened 20 years ago Closed 20 years ago

there is problem with correct rendering of :before and :after classes with position: relative

Categories

(Core :: Layout: Positioned, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

VERIFIED DUPLICATE of bug 238072

People

(Reporter: izsak, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1

The background images in :before & :after should be in the right place. And
other elements are in wrong place too.

Reproducible: Always
Steps to Reproduce:
1. View the page in Gecko browser

Actual Results:  
The page's layout is broken.

Expected Results:  
The elements should be rendered correctly according given CSS.
Attached file testcase
I think the main problem is that float:left or float:right in ::before or
::after pseuo-content is not supported in Mozilla (but it is in Opera7.5).
bug 93227 comment 0 claims float does not apply to :before/:after

I think this is due to http://www.w3.org/TR/CSS21/visuren.html#floats "only
applies to elements that generate boxes" in combination with
http://www.w3.org/TR/CSS21/generate.html#before-after-content "The formatting
objects (e.g., boxes) generated by an element include generated content"

that would mean this is invalid, if my reading of the spec is correct
'float' and 'position' and so forth do now apply to :before/:after (they didn't
use to in CSS2, but 2.1 changed that).
Well, I guess somewhere along these lines, the float (and position) property for
generated content is disabled:
http://lxr.mozilla.org/seamonkey/source/content/base/src/nsRuleNode.cpp#2715

*** This bug has been marked as a duplicate of 238072 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
bah, I searched for GC, but not generated content.

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

Attachment

General

Created:
Updated:
Size: