+ 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
7 odpowiedzi
+ 6
CHANDAN ROY
Use word-wrap in body tag
body {
word-wrap:break-word;
}
https://code.sololearn.com/WtNjkvWDF8vC/?ref=app
+ 4
html
{
width: 100%;
}
+ 1
Change width of the div to 100% from 100vw.
+ 1
CSS is missing. You have changed the code.
+ 1
🅰🅹 Thanks for solving this. You are a gem.
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.
0
Bro, it happened accidentally but I have added again and it didn't work. Can you check your solution and then suggest