【发布时间】:2009-01-05 16:01:04
【问题描述】:
我有以下 HTML
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style>
.box
{
border:solid black 1px;
padding:0px;
margin:0px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<input class="box" style="width:300px;" /><br />
<input class="box" style="width:150px;" />
<input class="box" style="width:150px;" /><br />
<input class="box" style="width:100px;" />
<input class="box" style="width:100px;" />
<input class="box" style="width:100px;" />
</form>
</body>
</html>
这个想法是文本框应该在右侧完成像素完美。
我最终会在第 2 行和第 3 行添加间距以扩大宽度以进行补偿,但目前我想渲染这个简单的示例。
那么我怎样才能删除这些文本框的边距以便正确对齐?
【问题讨论】: