+ -
当前位置:首页 → 问答吧 → IE6下 input多出1像素边距 火狐下正常

IE6下 input多出1像素边距 火狐下正常

时间:2010-10-13

来源:互联网

IE6下 input多出1像素边距 火狐下正常 另外input里面text和button如何保持对其?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <style> .bg{ background:#C00; height:26px;} .bg2{ width:960px; margin:auto;} .txt{ width:340px; height:24px; line-height:24px; border:1px #9D0000 solid; border-right:0px;} .but{ border:medium none; cursor:pointer; width:70px; height:26px; line-height:26px; background:#F90;} </style> </head> <body> <div class="bg"> <div class="bg2"> <input type="text" class="txt"/><input class="but" type="button" value="search"/> </div> </div> </body>
 提示:您可以先修改部分代码再运行

作者: zhonglimh   发布时间: 2010-10-13

还是你css这两句的问题,我也不懂太多css,你可以试着把这个有关边框的css删了,再看看。

.txt{ width:340px; height:24px; line-height:24px; border:1px #9D0000 solid; border-right:0px;}
.but{ border:medium none; cursorointer; width:70px; height:26px; line-height:26px; background:#F90;}

作者: juelong2010   发布时间: 2010-10-13