gpt4 book ai didi

html - 打破 css 中一行的表格单元格规则

转载 作者:行者123 更新时间:2023-11-28 01:07:04 25 4
gpt4 key购买 nike

我有一张由 <div> 制成的 table 和 display:table-rowtable-cellposition:relative .表格第一行如下

<div style="display:table-row">
<div style="display:table-cell; position:relative; width: 25% !important;"><strong>Unit price</strong></div>
<div style="display:table-cell; position:relative; style="width: 25% !important;"><strong>Price basis</strong></div>
<div style="display:table-cell; position:relative; style="width: 25% !important;"><strong>Delivery date</strong></div>
<div style="display:table-cell; position:relative; style="width: 25% !important;"><strong>Amount</strong></div>
</div>

下一行具有这些格式,但对于其中的一行,我只想在整行 (100%) 上设置一个宽度为 table-cell 的表格单元格。

<div style="display:table-row">
<div style="display:table-cell; position:relative; width: 100% !important;"><strong>some value</strong></div>
</div>

问题是文本在第一个表格单元格的宽度 (25%) 上换行。

我应该如何设置此行以在整行上展开文本?

最佳答案

我认为您想要使用的是 colspan,您可能还想使用 css 而不是内联样式。

<td colspan="5">this should go as long as the tables width and not 25%</td>

关于html - 打破 css 中一行的表格单元格规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52304248/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com