I have an ASP.NET MVC application which is used to show details from database. My index view for an entity having only one property ie text is
@foreach( var item in model)
{
<p class="col-md-4">@Item.text</p>
}
If the text field is too long, it is shown in a single line and a horizontal scroll bar appears. I want it to flow to next line. Kindly help me figure out the solution. Thanks
If I understand you correctly, just use word-break: break-all;
p { word-break: break-all; }
<p class="col-md-4">LOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUMLOREMISPUM</p>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.