form在IE6中会影响样式的问题

这个问题已经遇到过多次了,由于时间久了,总是会忘记。这里做一下记录,以便提醒自己。

主要发生在IE6中,比如有一个类似于如下的代码:

 <dl class="tbox">
                        <dt><strong>投票调查</strong></dt>
                        <form name='voteform' method='post' action='' target='_blank'>
                        <input type='hidden' name='dopost' value='send' />
                        <input type='hidden' name='aid' value='1' />
                        <input type='hidden' name='ismore' value='0' />
                        <dd>
                            <div class="fb">
                                <input type="radio" name='voteitem' value='1' />
                                朋友介绍</div>
                            <div class="fb">
                                <input type="radio" name='voteitem' value='2' />
                                门户网站的搜索引擎</div>
                            <div class="fb">
                                <input type="radio" name='voteitem' value='3' />
                                google或百度引擎</div>
                            <div class="fb">
                                <input type="radio" name='voteitem' value='4' />
                                别的网站上的链接</div>
                            <div class="fb">
                                <input type="radio" name='voteitem' value='5' />
                                其他途径</div>
                            <div class="submit">
                                <button type="submit" class="btn-1">
                                    投票</button>
                                <a href="#">查看结果</a></div>
                        </dd>
                        </form>
   </dl>

这样在IE6下会无缘无故的多出一部分空间。

解决办法:

form

{

   margin:0;

   padding:0;

}

 

会的,请路过,如果有解释不清楚的请留言。谢谢。

posted on 2010-05-24 17:10  senly  阅读(1100)  评论(0编辑  收藏  举报

导航