DEV Community

Discussion on: Inherit the width of the parent element when `position: fixed` is applied

digitalmarty profile image
Martin Youssef

Following your above instructions, my child div only seems to inherit the parent div's width when I begin resizing the view. Do you know what could be causing this?

attituede profile image
Josha Riedlmayer • Edited on

It sounds like you did not add a trigger to resize it in the first place, in this instruction it's linked to a button '#fixer' which will call the function on click, you could try doing it on document ready