Is there a way to reduce the font size of my header if it is overlapping with another element?
I have tried using word-break: break-all;
, but the overlap persists.
For context, I am still fairly new to coding, so please forgive me if this question seems basic.
Here is my code snippet:
.container{ position: absolute; top: 0; left: 0; padding: 5%; }
and
.container2{ position: absolute; bottom: 0; margin-bottom: 30px; width: 100%; }
Essentially, when there is an <h2>
within .container and the text is too long, it overlaps with the text of the <h2>
within .container2. How can I prevent this overlap or resize the text appropriately?