开发者

IE7 giving UL a margin even though I told it not to

开发者 https://www.devze.com 2023-02-18 09:59 出处:网络
I have a ul which displays fine in normal browsers, and even IE8! However, when I put IE8 into IE7 mode (could that be the issue?), I get the layout to the left (normal behaviour on the right:

I have a ul which displays fine in normal browsers, and even IE8! However, when I put IE8 into IE7 mode (could that be the issue?), I get the layout to the left (normal behaviour on the right:

IE7 giving UL a margin even though I told it not to

And here be my CSS:

ul
{
    position: relative;
    z-index: 3;
    list-style: none;
   开发者_高级运维 margin: 0px;
    padding: 0px;
    background: transparent;
    margin-left: 0px;
}

My question is: How do I get rid of the silly offset (I've used margin-left -10px (or another negative value), but of course that affects other browsers too. Thanks for any help :-)


I normally just use "clean standard CSS" for cross browser compatibility.

Did you test in Google Chrome, Firefox and Safari?

Try setting the "box model" on the UL, by using display:block;

0

精彩评论

暂无评论...
验证码 换一张
取 消