Anjali, thank you very much for your response.
I’ve already solved this issue by moving the content of each div into a dedicated html page. Now I understand why my new approach worked.