In my navigation bar, I have a link that opens a dropdown when clicked. The parent of this link has the CSS property overflow: hidden
in place to truncate the text if it becomes too long. However, I am facing an issue where the dropdown is not positioned correctly when the parent's width changes dynamically. The dropdown ends up getting cut off due to the overflow property.
Is there a way to fix this using CSS only? I prefer not to resort to using position: fixed
and manipulating margins with JavaScript as a solution.
You can view a simple example in this fiddle here
Thank you for your help!