position absolute element is underneath other element
im trying to create a dropdown component in react,
the dropdown whose position is relative has a button and a div which is position absolute but the position absolute element is cropped by container of the dropdown component
this is the contaier of the "<DropDown />"
and this is the dropdown component
13 Replies
and this is the css of the drop down component
Could you create a CodePen for this? It's a bit hard to read like this. At first glance it looks like you need a position: relative on the dropdownButtons.
sure
but i have figured out that the an over flow is causing this
but just give me a min ill create a code pen
https://stackblitz.com/~/github.com/yesrab/musicCart
here i created a stackblitz insted
if i remove the both overflow properties the issue gets fixed
but in the event of view port width getting smaller i want overflow y
any clue how i can get this?
anyone?
The stackblitz is not working for me
It can't find that repository
wdym can you send a ss?
Perhaps it's a private repository or something?
wait a moment
try this
I can see it now. What do you mean with the smaller viewports you want overflow y?
Right now your overflow y is set to hidden. This means that anything that will vertically flow out of the sortOptionsContainer will be hidden. That's why you're not seeing the dropdownMenu now, but you do see it when you remove the overflow y: hidden;
can we hop on a call?
Sure