I'm working on a Forum project using Laravel 9 and for posting a new question, if I enter the text like this (without pressing Enter or adding ):
Then the body of the question will be shown like this:
And as you can see it overlaps the box that is in it and goes out which is wrong!
And this is the code for showing the body:
<div >
<p>
{{ $question->que_body }}
</p>
</div>
So what's going wrong here?
How can I solve this issue?
CodePudding user response:
You need styling, specifically
topic__text p {
overflow-wrap: break-word;
}
CodePudding user response:
If you are using one of laravel starter kit, you must be using tailwind.
Here you can find class that most suitable to your need.
- Overflow = https://tailwindcss.com/docs/overflow
- Overscroll = https://tailwindcss.com/docs/overscroll-behavior