Why is my html output a paragraph in a single line | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Why is my html output a paragraph in a single line

<p>a bunch of code</p> when I run this code in the browser the paragraph is a single line forcing me to scroll left and right.

4th Apr 2018, 7:19 PM
Kondwani Mwape
Kondwani Mwape - avatar
4 Answers
+ 2
p { word-wrap: normal; } ^You could do that to enact word-wrap. Also, consider the container that this paragraph is inside of; what is its width? overflow property? etc... All things to consider.
4th Apr 2018, 7:22 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
thanks
4th Apr 2018, 7:22 PM
Kondwani Mwape
Kondwani Mwape - avatar
+ 2
You're welcome. In case you didn't see my immediate edit of my original post, consider what container your paragraph is inside of. It's parent needs to have appropriate width set to it, as well as overflow properties.
4th Apr 2018, 7:23 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
thank you very much
4th Apr 2018, 7:25 PM
Kondwani Mwape
Kondwani Mwape - avatar