关于表单显示的小问题,在线等!回答正确就给分!

来源:百度知道 编辑:UC知道 时间:2024/05/18 02:29:42
感谢你关注我的问题,这个问题是这样的:
我做了一个网页,网页里面放了一个一行一列的表格,设置其宽为500,高为15,边框大小为1,接着再再表格里面插入一个表单,编辑好后在浏览器上预览,一切OK,与设置的相符。但是,当我在这个表格的表单里面插入一个文本字段后,再到浏览器上浏览时,却发现文本字段的高度没有基本没变,可表格的高度变大了许多,大小居然比原来的两倍大,这是什么原因啊,我用了CSS来控制表单的大小也是不行的,且尝试过好几次了....
很郁闷的,这个问题我碰见了好几次,独自搞了好长时间,也在网上查了好多资料,都没解决,现在请各位高手帮帮忙!解决后即给分!

注:我编写的代码如下:
<html>
<head>

<title>无标题文档</title>
<style type="text/css">
<!--
.m {
background-color: #990000;
height: 15px;
width: 50px;
}
-->
</style>
</head>

<body><table width="254" height="10" border="1" >
<tr>
<td height="15"><form action="" method="post" enctype="multipart/form-data" name="form1">
<input type="text" name="textfield" class="m">
</form>

把<form>放到<td>前
把</form>放到</td>后

这样:
><table width="254" height="10" border="1" >
<tr> <form action="" method="post" enctype="multipart/form-data" name="form1">
<td height="15">
<input type="text" name="textfield" class="m">

</td>
</form>
</tr>
</table>

<form>放到<td>前
</form>放到</td>后

><table width="254" height="10" border="1" >
<tr> <form action="" method="post" enctype="multipart/form-data" name="form1">
<td height="15">
<input type="text" name="textfield" class="m">

</td>
</form>