I used position: absolte in my CSS and i got a problem when i reduce the size of the page ! The text doesn’t fit in the page .
that’s my code link: https://codepen.io/toufikbens/pen/XWjpQNG
when you change the width of ul#secondary? Do you mean this part?
Yes exactly !
Hi @toufikbens, that’s unfortunately an effect of using “position absolute” on elements.
As the name suggest, no matter what happens to the screen, or other elements on that page, the absolute element will stay in that position “no matter what”.
There are ways to fix that, but they are incredibly inefficient and “painful”.
Nowadays there are way better tools to deal with this kind of problem, mainly letting the browser calculate the space needed and position accordingly.
Hope it helps
a simple solution can be adding a media query.
@media(max-width: xxx px); and then define new rules for that element.