Dropdown Menu Positioning Issue

Hi Everyone,

I am working on a project that use Dropdown menu (Three green dots menu show file details), I tried to set that fixed position and show the menu when click. But some issue happen that when I click the last row from the table the dropdown submenu show at the bottom not auto popup at the parent div above relatively. I have tried to use different position property, (Auto, relative, absolute and fixed) but still not success…When the parent div at the top in the browser, the menu will show at the bottom from the parent div , when the parent div in the bottom in the browser, the popup menu will show at the top of the parent div. May I know how to set it? or need to customize some coding to do so?
Want to do like that sample when I click the Dropdown menu (not right click):

My share link as below:

Please give some comments or guideline if you can share any method .
Thank you so much for your help!!