开发者

IE6 double padding and margin bug

I was looking around the net and nothing works.

I have a box with an unorderd list and ie6 makes the padding and margin double size

.block {
    width: 236px;
    float: left;
    border: 1px solid #cecece;
    background: url(images/list_bg.png) repeat-y;

}

.block li {
        width: 237px;
        height: 74px;
        background: url(images/arrow.png) no-repeat 0px 13px, url(images/bottom.png) left bottom no-repeat;
        margin-left: 30px;
        padding: 0p开发者_如何学Gox 20px;
        list-style: none;
        line-height: 36px;

    } 

if i add display inline it breaks, what do im doing wrong?


Your box is narrower than the list item inside of it.

You should have a look at the Box Model

IE6 double padding and margin bug


some times ie6 will take double margin , Read http://www.positioniseverything.net/explorer/doubled-margin.html

we can manage this issue with ie hack code ie6 _ , ie >

.class {_margin-left: 30px;}

.class {>margin-left: 30px;}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜