Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά παραβίασης».

Μάθετε περισσότερα

position: sticky not working correctly inside position: fixed container

  • 1 απάντηση
  • 0 έχουν αυτό το πρόβλημα
  • 34 προβολές
  • Τελευταία απάντηση από TyDraniu

more options

Hello Firefox Support Team,

I would like to report a browser compatibility issue regarding CSS positioning behavior that differs from Chromium-based browsers.

    • Issue Description:**

When an element with `position: sticky` is placed inside a container with `position: fixed`, Firefox treats the sticky element as if it has `position: relative`, effectively breaking the sticky positioning functionality.

    • Expected Behavior:**

The sticky element should maintain its sticky positioning behavior even when nested inside a fixed-positioned container, as it does in Chromium-based browsers.

    • Current Firefox Behavior:**

The sticky element loses its sticky properties and behaves like a relatively positioned element.

    • Use Case:**

This issue particularly affects modal implementations where: - The `body` element receives `position: fixed` to prevent background scrolling - Page elements (such as `.total-section`) should maintain their sticky behavior regardless of changes to the body positioning

    • Browser Comparison:**

- **Chromium browsers (Chrome):** Sticky positioning works correctly in this scenario - **Firefox:** Sticky positioning fails and falls back to relative behavior

    • Request:**

Could you please consider aligning Firefox's behavior with other major browsers? The current inconsistency creates cross-browser compatibility issues and forces developers to implement JavaScript workarounds.

Thanks!

Hello Firefox Support Team, I would like to report a browser compatibility issue regarding CSS positioning behavior that differs from Chromium-based browsers. **Issue Description:** When an element with `position: sticky` is placed inside a container with `position: fixed`, Firefox treats the sticky element as if it has `position: relative`, effectively breaking the sticky positioning functionality. **Expected Behavior:** The sticky element should maintain its sticky positioning behavior even when nested inside a fixed-positioned container, as it does in Chromium-based browsers. **Current Firefox Behavior:** The sticky element loses its sticky properties and behaves like a relatively positioned element. **Use Case:** This issue particularly affects modal implementations where: - The `body` element receives `position: fixed` to prevent background scrolling - Page elements (such as `.total-section`) should maintain their sticky behavior regardless of changes to the body positioning **Browser Comparison:** - **Chromium browsers (Chrome):** Sticky positioning works correctly in this scenario - **Firefox:** Sticky positioning fails and falls back to relative behavior **Request:** Could you please consider aligning Firefox's behavior with other major browsers? The current inconsistency creates cross-browser compatibility issues and forces developers to implement JavaScript workarounds. Thanks!

Όλες οι απαντήσεις (1)

more options

Perhaps it's our bug 1944481.

Χρήσιμο;

Υποβολή ερώτησης

Πρέπει να συνδεθείτε στον λογαριασμό σας για να απαντήσετε σε δημοσιεύσεις. Ξεκινήστε μια νέα ερώτηση εάν δεν διαθέτετε ακόμα λογαριασμό.