html - How to show multiline text in a table cell -
i want show paragraph database table cell.
the result large 1 line, ignoring how organised in database. ignoring 'enters' example (new lines)
i want show according how it's written in database.
for example if paragraph saved this:
hello , name x.
i want showed that, instead of:
hello, myname x.
you want use css white-space:pre
applied appropriate <td>
. table cells, example:
td { white-space:pre }
alternatively, if can change markup, can use <pre>
tag around content. default web browsers use user-agent stylesheet apply same white-space:pre
rule element.
the pre element tells visual user agents enclosed text "preformatted". when handling preformatted text, visual user agents:
- may leave white space intact.
- may render text fixed-pitch font.
- may disable automatic word wrap.
- must not disable bidirectional processing.
Comments
Post a Comment