I've encountered a strange issue with a button in my code that inserts HTML textareas onto the page. Initially, when the button is clicked, everything appears as expected. However, upon subsequent clicks, the textareas start to appear in random places - overlapping each other and not adjusting properly. Interestingly, the textareas snap back to their correct positions when the browser window is resized or affected in any way, suggesting a need for content redraw.
It seems that my HTML and CSS are correct, and the problem lies in the browser's rendering. Can someone explain why this is happening and suggest a solution to ensure the textareas always appear in the right place whenever the button is clicked?
If there are any improvements to be made to this question, please provide feedback rather than simply downvoting, and I'll gladly make the necessary adjustments. I'm open to criticism and willing to clarify any points!
EDIT: Here is a JSFiddle link with the code that is causing the issue.