Streaming live at 10am (PST)

How to have parent div block overlay child


#1

Hello,

I am having trouble on my webflow template having the grey parent div block overlay over its own white child element even though the child’s z-index is less? Thanks

https://preview.webflow.com/preview/test-179af8?utm_source=test-179af8&preview=639e76008cff0290471f7fab47c5af7a


#2

I’m not sure what you are trying to do here. If you want them to be independent, just make a wrapper div and position them relative or absolute within that wrapper and control the z index independently.


#3

I’m trying to have the child element, Div Block 132, always be slightly larger (105%) than the parent element, Div Block 129, so when I change the parent element, the child changes size too. So far I have accomplished this but I can’t seem to have the parent element show through the child element no matter what I change the Z-index to. Any ideas?


#4

Here’s an article on how css works for this. https://stackoverflow.com/questions/3616587/is-it-possible-to-have-a-child-element-behind-his-parent-element-with-z-index/32539527

Why don’t you make the smaller element the child instead of the larger one since you want that on top?