csswizardry-grids
csswizardry-grids copied to clipboard
Position: fixed of grid__item
I'm trying to set position: fixed to a .grid__item.two-sixths, however the column will go to the bottom of the page, and the other one (four-sixths) will float to the left.
I also tried to set the position to the element inside the column (a ul), however that doesn't work, either. The ul loses the width of the parent.
Am I missing something, or is this impossible?
Hi @alberteddu saw your question about position fixed and hope this helps you:
https://developer.mozilla.org/en-US/docs/Web/CSS/position
fixed Do not leave space for the element. Instead, position it at a specified position relative to the screen's viewport and don't move it when scrolled. When printing, position it at that fixed position on every page.
I don't know what exactly you are trying to accomplish but there may be an alternative solution? Position fixed will always be relative to the viewport (window) and not to its position or order in the DOM.