Why does a horizontal scroll bar appear when i set the width to 100vw?

https://codepen.io/saad-shehzad-the-bashful/pen/NWZdMmR you can check my code here its a mobile issue like i dont want the scroll bar i can just use overflow-x hidden but it just doesnt center and its not the best practice so what to do?
5 Replies
Jochem
Jochem5mo ago
setting width to 100% isn't necessary, divs already stretch to fill the full width of the page cause you're setting it in a media query, and you have a width set on it outside, you can just remove it in the mediaquery by using width: unset;
Code-S ♛
Code-S ♛OP5mo ago
OMG jochem you are a life saver life saver count:2
Jochem
Jochem5mo ago
glad to help 🙂
clevermissfox
clevermissfox5mo ago
How do you decide when to use unset vs revert ?
Jochem
Jochem5mo ago
I try to remember one of them, and pick whichever I remember first there's a difference, but I'm not familiar with what it is 😄
Want results from more Discord servers?
Add your server