消除表单元素后的空格
我的表格单元格中有一个表单元素,它在末尾给了我额外的不需要的空间。我尝试将样式表更改为 form{ margin-bottom:0;} 如果表单元素位于表格单元格中,如何消除表单元素后面的空格?
echo '<tr id="'.$serial.'" class="more"><td colspan="4" valign="top"><form id="newcredit'.$serial.'" name="newcredit'.$serial.'" style="margin-bottom:0">';
echo '<input type="text" id="Label" name="Label" style="width:75px" onKeyPress="return submitcredit(this.event, '.$serial.')" />';
echo '<img src="plussm.png" id="'.$serial.'" title="Add Credit" onclick="creditadd(this.id), removewatermark(this.value, this.id)" /></form>';
服务器数据库调用... foreach(blahs as blah)...
echo '<br>';
echo '<input type="text" id="'.$creditid.'" name="Label" style="width:75px" value="'.$recordLabel).'" onchange="creditupdate(this.id, this.name, this.value)" />';
echo '</td></tr>';
I have a form element in a table cell which is giving me extra unwanted space at the end. I have tried changing my style sheet to form{ margin-bottom:0;} How do i eliminate the space after the form element if it's in a table cell?
echo '<tr id="'.$serial.'" class="more"><td colspan="4" valign="top"><form id="newcredit'.$serial.'" name="newcredit'.$serial.'" style="margin-bottom:0">';
echo '<input type="text" id="Label" name="Label" style="width:75px" onKeyPress="return submitcredit(this.event, '.$serial.')" />';
echo '<img src="plussm.png" id="'.$serial.'" title="Add Credit" onclick="creditadd(this.id), removewatermark(this.value, this.id)" /></form>';
Server Database call... foreach(blahs as blah)...
echo '<br>';
echo '<input type="text" id="'.$creditid.'" name="Label" style="width:75px" value="'.$recordLabel).'" onchange="creditupdate(this.id, this.name, this.value)" />';
echo '</td></tr>';
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是指表格末尾或下方的额外空间吗?
我遇到了类似的问题,我有两个并排的表格单元格,第一个单元格的宽度为 100%。
第二个单元格中有一个按钮,但按钮的右侧与单元格末端之间有间隙。
向单元格添加按钮会加宽最后一个按钮末尾的间隙。
Do you mean extra space at the end or on the below the form?
I am having a similar issue where I have two table cells side by side, and the first cell has a width of 100%.
There is one button in the second cell, but there is a gap between the right-hand side of the button and the end of the cell.
Adding buttons to the cell widens the gap at the end of the last button.