I am struggling with positioning the items in my dropdown menu. The functionality itself is working perfectly, but the issue arises when it comes to aligning the dropped down items. Initially, I positioned them based on a smaller screen size, but when viewing it on a larger screen, the alignment was off.
While the dropdown functions correctly in jsFiddle, uncommenting the 'tests' in the HTML section reveals the problem I am facing. If the parent item of the dropped down list shifts left or right, the dropped down items do not adjust accordingly.
Upon inspection, I realized that I used left:...
for positioning the dropped down items, which seems to be causing the issue. Unfortunately, I am unsure of the correct way to position them. Can you help me solve this problem?