This is quite a tough case to explain, so I appreciate your patience.
I want to have a grid of widgets, dynamically displayed and relatively positioned so I could place them dynamically where I want. These widgets will sit in front of the main content of the page. The user should be able to interact with them and the content behind too (click, type, etc).
My problem is that I need for these widgets to sit inside a CSS grid
container to achieve my goal, but I don’t want the container to sit in front of the main page content blocking it, which is what happens every time I try to solve this issue. I tried negative z-index
for the container, I tried playing with other elements’ z-index
, but to no avail.
Here’s an image to demonstrate the result I want. I could not come up with any usable HTML/CSS as of yet sadly.
2
Answers
FWIW, @A Haworth got the answer in the comments section.
Here's a simple implementation that solves my problem.
if widgets and content does not intersect each other visually, and they dont, as I see, why place widgets in its own contianer? place them together with content. such way includes "dynamically displayed and relatively positioned" chances.
if you still want different containers for content and widgets, both left-side and right-side widgets must have its own container, and with content must be wrapped in parent element, which will determine their positions by
grid
orflex