【发布时间】:2023-03-08 14:35:01
【问题描述】:
我们需要删除table底部的多余空间。
目前,我们有这样的:
但我们想要这样:
css
.wk_mp_body td {
background: #282828;
}
.wk_mp_body td {
padding: 5px 7px;
}
tbody {
display: table-row-group;
vertical-align: middle;
border-color: inherit;
}
table {
border: 0;
border-collapse: collapse;
empty-cells: show;
font-size: 100%;
}
html
<table cellspacing="0" class="border wk_mp_list_table">
<thead>
<tr id="wk_mp_tr_heading">
<th><span><?php echo $helper->__('Product Name') ?></span></th>
<th><span><?php echo $helper->__('Date') ?></span></th>
<th><span><?php echo $helper->__('Product Status') ?></span></th>
<th><span> </span></th>
</tr>
</thead>
<tbody class="wk_mp_body">
<tr>
<td><input class="input-text" name="s" placeholder='<?php echo $helper->__(' type="text">' value="<?php echo $this->getRequest()->getParam('s')?>"/></td>
<td><span class="wk_mp_td_span"><?php echo $helper->__('') ?> <input class="input-text" id="special_from_date" name="from_date" placeholder='<?php echo $helper->__(' value="<?php echo $this->getRequest()->getParam('from_date')?>">'/></span> <span class="wk_mp_td_span"><?php echo $helper->__('') ?> <input class="input-text" id="special_to_date" name="to_date" placeholder='<?php echo $helper->__(' value="<?php echo $this->getRequest()->getParam('to_date')?>">'/></span></td>
<td><select class="input-text" name="prostatus" style="height:35px;">
<option value="">
<?php echo $helper->__('All') ?>
</option>
<option value="1">
<?php echo $helper->__('Approved') ?>
</option>
<option value="2">
<?php echo $helper->__('Unapproved') ?>
</option>
</select></td>
<td><button class="button" style="background:#fc6c0b;" title="Save" type="submit"><span><span><span><?php echo $helper->__('Submit') ?></span></span></span></button></td>
</tr>
</tbody>
</table>
请帮我找到解决办法
【问题讨论】:
-
可以添加对应的HTML吗?
-
或者,更好的是,为我们准备一个小提琴:jsfiddle.net
-
@Pugazh 我添加了 html 部分,如果可能的话我会尝试 jsfiddle.net。
-
您还可以使用堆栈片段功能(图标看起来像一个带有
<>的页面)。
标签: html css html-table