[英]Indenting second line of list in paragraph element (not UL or OL)
I have a table with the following structure: 我有一个具有以下结构的表:
html { width: 400px; }
<table> <tr> <td>Description:</td> <td style="white-space: pre-wrap;"> Some text which could be quite long with some 'simple' lists created by the user like this: - Point 1 - Point 2 - Point 3 - Another point which is a bit longer than the previous one - Point 4 </td> </tr> </table>
When I would view this in the browsers, on a screen with a small width, one of the bullet points will wrap to the new line and start at the beginning of this new line. 当我在浏览器中以较小宽度的屏幕查看此内容时,其中一个要点将换行到新行并从该新行的开头开始。
Ideally I want this bullet point to have the same indentation as the line before so both lines of text of the same bullet point will have the same indentation. 理想情况下,我希望此项目符号点与之前的行具有相同的缩进,以便同一项目符号点的两行文本均具有相同的缩进。
In case you're wondering, the reason why there is no ordered or unordered list element is because the user is limited to using a simple textarea to enter their content. 如果您想知道,为什么没有有序或无序列表元素是因为用户仅限于使用简单的文本区域输入其内容。
Could anyone tell me if this is possible, and if so, how? 谁能告诉我这是否可能,如果可以,怎么办?
Thanks in advance. 提前致谢。
Shouldn't the code be like this: 代码不应该是这样的:
<table>
<tr>
<td>Description:</td>
<td style="white-space: pre-wrap;">
Some text which could be quite long with some 'simple' lists created by the user like this:
<ul>
<li>Point 1</li>
<li>Point 2</li>
<li>Point 3</li>
<li>Another point which is a bit longer than the previous one</li>
<li>Point 4</li>
</ul>
</td>
</tr>
</table>
You need to use proper ul and li
tags instead of -
. 您需要使用正确的ul and li
标记而不是-
。
EDIT 编辑
If you are willing to populate the value from some text-area
field, then you might implement WYSIWYG text editors like TinyMCE , CKeditor . 如果您愿意从某些text-area
字段中填充值,则可以实现WYSIWYG文本编辑器,如TinyMCE , CKeditor 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.