【发布时间】:2019-07-01 16:44:13
【问题描述】:
我有两个相邻的 span 元素。第一个span 有符号元素,第二个有文本。文本太长并在符号下方换行。有没有办法防止文本进入第一个span?这是一个例子:
table.tbl {
font-size: 12px;
width: 500px;
}
table.tbl thead th {
text-align: left;
}
table.tbl tbody td {
text-align: left;
}
span.symbol {
color: red;
font-weight: bold;
}
<table class="tbl">
<thead>
<tr>
<th>Data Validation</th>
</tr>
</thead>
<tbody>
<tr>
<td>Form validation text description and some instructions.</td>
</tr>
<tr>
<td>
<span class="symbol">?</span>
<span class="text">Here we have some text that can be too long sometimes. In that case text will wrap under question mark symbol from the span element above.</span>
<br><span style="color:red">- Test User Name 02/07/2019</span></td>
</tr>
</tbody>
</table>
有没有办法防止文本进入符号范围?
应该是这样的:
? Here we have some text that can be too long sometimes. In that case text will
wrap under question mark symbol from the span element above.
- Test User Name 02/07/2019
【问题讨论】:
标签: html css internet-explorer internet-explorer-9 css-tables