为什么ie7忽略了我的第一个列表项(仅)上的左边距? [英] Why is ie7 ignoring the left-margin on my first list item (only)?

查看:75
本文介绍了为什么ie7忽略了我的第一个列表项(仅)上的左边距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://blog.helpcurenow.org/test/mockups/mar2010 /lp.html

在上面的登录页面中,我有一个报价"框,其中包含四个捐赠按钮.前三个定位目标是具有单个ID的对象,其左侧边距为13px.

In the above landing page, I have an offers box that has four donation buttons. The first three are targeted with individual id's and given a left margin of 13px.

除了ie7以外,我在使用的所有浏览器中都运行良好.出于某种原因,ie7忽略了第一个列表项上的13px的左边距,并且仅忽略了该左边距.

All is well in every browser I'm viewing in except ie7. For some reason ie7 is ignoring the left-margin of 13px on the first list item, and only on that one.

奇怪的是,当我打开ie的开发人员工具(实际上不是在ie7中查看,而是在ie7模式下使用ie8)并选择了元素时,它表明存在13px的边距,并且没有被划掉.浏览器似乎只是忽略了它!

The strange part is when I open ie's developer tools (not actually viewing in ie7, but using ie8 in ie7 mode) and select the element, it shows that the 13px margin is there, and not crossed out. The browser just seems to be ignoring it!

这里是否应该了解一些ie7怪癖,或者我错过了应该添加的CSS声明?有什么想法吗?

Is there some ie7 quirk I should know about here or did I miss a CSS declaration I should have added? Any ideas??

谢谢!

推荐答案

尝试将容纳那些liul上的填充设置为10px 13px,然后从li中删除margin-left

Try setting the padding on the ul that houses those lis to 10px 13px, then remove the margin-left from the lis.

这篇关于为什么ie7忽略了我的第一个列表项(仅)上的左边距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆