0

All divs in my page are too wide for the viewport

What can I do if that happens (what’s in the title)? I can move the page horizontally to see a drop more content.

30th Jul 2023, 8:45 PM
Eli Klein
7 Antworten
+ 5
You can use the website to copy and paste your code in the HTML Editor. Save and share the link. https://www.sololearn.com/compiler-playground
30th Jul 2023, 8:57 PM
Chris Coder
Chris Coder - avatar
+ 4
If you share your code, via code playground we can have a look and offer suggestions.
30th Jul 2023, 8:48 PM
Chris Coder
Chris Coder - avatar
+ 3
Eli Klein In case you are having trouble and want a simple solution, I very much recommend using Bootstrap and their containers. Saves a lot of headache when it comes to making things just the right size for the screens. It does a lot of the heavy lifting for you.
30th Jul 2023, 11:25 PM
Justice
Justice - avatar
+ 1
Can it be on a github repository? I built it locally
30th Jul 2023, 8:54 PM
Eli Klein
+ 1
Eli Klein Use metatag: <meta name="viewport" content="width=device-width, initial-scale=1.0"> Limit element width: div { max-width: 100%; } Overflow control: body { overflow-x: auto; }
31st Jul 2023, 5:32 PM
‎ ຸ
+ 1
Oh i fixed it already by using width: 100% and not 100vw. The issue was that vw didnt take the scrollbar into consideration Thanks all.
2nd Aug 2023, 3:02 PM
Eli Klein
0
‎ ຸ That is great information, but what does it do? Why should we use that?
31st Jul 2023, 7:54 PM
Chris Coder
Chris Coder - avatar