日期:2014-05-17  浏览次数:20695 次

请教一个DIV做的格子错位问题
<style>
.grid{
border-top:1px   solid   black;
}
.title   {
border-right:1px   solid   black;
border-left:1px   solid   black;
border-bottom:1px   solid   black;
}
.obj{
border-right:1px   solid   black;
border-bottom:1px   solid   black;
}

</style>


<div   class= "grid "   style= "width:600px ">
<div   id= "line0 "   style= "width:600px; ">
<div   class= "title "   style= "display:inline;width:200px;height:25px "> 姓名 </div>
<div   class= "obj "   style= "padding-left:5px;display:inline;width:400px;height:25px "> <input   id= "name "   type= "text "> </div>
</div>
<div   id= "line1 "   style= "width:600px;height:25px ">
<div   class= "title "     style= "display:inline;width:200px;height:25px "> id </div>
<div   class= "obj "     style= "padding-left:5px;display:inline;width:400px;height:25px "> <input   id= "id "   type= "text "> </div>
</div>
</div>

右边装有文本框的格子向下错了一个像素,不知怎么解决,请大家帮帮忙

------解决方案--------------------
把字体大小定义好,~比如,font-size:12px再试试``