+ 2

I have a CSS related query.

I was just playing around with freecodecamp's javascript challenges. I wrote a few codes but everytime, I am facing an issue that I am unable to solve. I want the output to wrap at max-width of 100% but it's overflowing in a single line. Can you suggest what changes in CSS needed to make it work? When I click on generate primes button, it generates primes and renders on screen. Suppose you use a big number like 200 in input, it renders a big inline list that overflows the screen width. I want it to wrap to the next line when it reaches the screen width https://code.sololearn.com/W4A159A11a25

29th Mar 2021, 9:43 AM
CHANDAN ROY
CHANDAN ROY - avatar
7 ответов
+ 6
CHANDAN ROY Use word-wrap in body tag body { word-wrap:break-word; } https://code.sololearn.com/WtNjkvWDF8vC/?ref=app
29th Mar 2021, 11:08 AM
A͢J
A͢J - avatar
+ 4
html { width: 100%; }
29th Mar 2021, 10:53 AM
JOY
JOY - avatar
+ 1
Change width of the div to 100% from 100vw.
29th Mar 2021, 10:18 AM
Kashyap Kumar
Kashyap Kumar - avatar
+ 1
CSS is missing. You have changed the code.
29th Mar 2021, 10:24 AM
Kashyap Kumar
Kashyap Kumar - avatar
+ 1
🅰🅹 Thanks for solving this. You are a gem.
29th Mar 2021, 11:20 AM
CHANDAN ROY
CHANDAN ROY - avatar
0
Thanks for your response. Changed but the problem still not solved. use a big number like 1000 and you will see it overflows the width size.
29th Mar 2021, 10:20 AM
CHANDAN ROY
CHANDAN ROY - avatar
0
Bro, it happened accidentally but I have added again and it didn't work. Can you check your solution and then suggest
29th Mar 2021, 10:29 AM
CHANDAN ROY
CHANDAN ROY - avatar