Open Bug 433482 Opened 17 years ago Updated 3 years ago

{inc} Floated Navigation in a special CSS setup is broken

Categories

(Core :: Layout: Floats, defect)

defect

Tracking

()

People

(Reporter: mail, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5 When visting the website, the navigation part is broken, which means, it is positioned below the actual navigation bar. This happens randomly, so it is not a basic CSS problem. Reproducible: Couldn't Reproduce Steps to Reproduce: 1. Opening the website 2. Reloading or trying again later until the bug occurs Actual Results: Navigation is positioned below navigation bar. Expected Results: Navigation is positioned within the navigation bar.
Attached file Testcase #1
Component: General → Layout: Floats
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → layout.floats
Summary: Floated Navigation in a special CSS setup is broken → {inc} Floated Navigation in a special CSS setup is broken
Version: unspecified → Trunk
I was just informed, that you can easily reproduce this bug. When reloading from cache (F5), the bug doesn't occur, but when reloading from the server directly (CTRL + F5), the bug occurs.
OS: Linux → All
Hardware: PC → All
Still no update after about a year?
I had a play with the CSS of the original site first brought this "bug" to the attention of Ben. The problem he describes is specifically caused by CSS generated content, using the :before pseudo class selector. For example: ul#navigation:before { content: url(path/to/image.png); } This type of declaration was causing the list items to drop below the actualy bounds of the ul#navigation element. A simple fix to "get around" this issue, is to specifically set the height of the generated content. In the case in question, I specified the height of the image that was being included. With that said, during the course of my testing, I found that attempting to position CSS generated content was near enough impossible. For example, applying absolute positioning and changing the top and left properties had absolutely no effect, however the latest stable build of Opera moved the content, as expected. I was also unable to float the content. I'm not sure if the standards even dictate how user agents are supposed to treat the user generated content (it isn't added to the DOM, from what I can see - and isn't supposed to be), so would this be a bug? I've just written a small test-case to highlight this lack of control over generated content - I'll add the test case and a screenshot to highlight the differences between firefox and the other browsers I tested (Webkit and Opera).
Attached file HTML test case
Screenshot of the HTML test case displayed in 3 browsers, first Firefox 3.0.10, then Arora (recent WebKit) and finally Opera 9.64. As you can see, Firefox 3 is the odd one out. Is it wrong? I don't know. Is it unexpected? Yes indeedy!
(In reply to comment #4) positioning/floating of generated content (::before/::after) is bug 238072, and is fixed on Gecko 1.9.1 - Firefox 3.5b4.
It seems that this bug has been fixed for a while, closing it down as WFM on: 48.0a1 20160309030419Mozilla/5.0 (X11; Linux i686; rv:48.0) Gecko/20100101 Firefox/48.0
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Adrian, I just tested my original use-case, and the bug still occurs as described (by hitting ctrl+F5).
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---
(Reproducable quite easily with attachment 320723 [details] in a build from yesterday or today. I don't see a problem with attachment 377961 [details], though.)
My apologies, for some reason I couldn't initially get Mats testcase (attachment 320723 [details]). @David: Correct, I can reproduce it with :mats testcase, but not with original one (attachment 377961 [details]).
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: