简体   繁体   English

表格内的HTML输入需要一些额外的空间-CSS

[英]HTML input inside table takes some extra space — CSS

I got the following problem: 我遇到以下问题:

在此处输入图片说明

I constantly have little space (light blue colour is space) at the bottom of my form. 我的表单底部经常没有空格(浅蓝色是空格)。 Here is the HTML code that I use: 这是我使用的HTML代码:

 <table id="wysz">
   <tr>
    <td rowspan="3" style="width: 218px; height: 36px; padding: 0px;"><img src="grafa/wyszukiwara/Wysz1.jpg"></td>
    <td style="width: 253px; height: 4px; padding: 0px;"><img src="grafa/wyszukiwara/WyszGora.jpg" alt=""></td>
    <td rowspan="3" style="width: 47px; height: 36px; padding: 0px;"><img src="grafa/wyszukiwara/WyszLupa.jpg"></td>

  </tr>
  <tr>
    <td style="padding: 0px; "><form ><input style="width: 253px; height: 29px; border-style: none; display:block;" name="query" ></form ></td>
  </tr>
 <tr>
    <td style="width: 253px; height: 3px; padding: 0px; "><img  src="grafa/wyszukiwara/WyszDol.jpg"></td>
  </tr>
</table>

And here is my CSS: 这是我的CSS:

#wysz{
    border:0px solid black;
    padding:0px;
    border-spacing: 0px;
    width: 513px;
    height: 36px;
    overflow: scroll;
    vertical-align: top;

}
#wysz td{
    border:0px solid black;
    border-spacing: 0px;
    padding:0px;
}
table,th,td
{
    border:0px solid black;
    background-color:lightblue;
    vertical-align: top;
}

I did not past all of my code but only that seems to be important. 我并没有覆盖我所有的代码,但是那似乎很重要。

Thanks in advance 提前致谢

The form element is generating its own margin at the bottom. 表单元素在底部生成自己的边距。 Add the following style to the form to reduce it to 0px 将以下样式添加到表单以将其减少到0px

style="margin-bottom: 0px;"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM