开发者

IE Ul LI Padding?

Check this link!

I am having the hardest time trying to figure out why my last li item is being pushed to the bottom in IE. I have the width, height set for the container. The li has padding/margin to 0. Li is 开发者_如何转开发float left. Still being pushed down. Seeking a Guru to help a n00b here.


Try putting margin:0 to the ul rule ..

The automatic margin the IE assigns, decreases the width available to contain the floated elements, and so they wrap ...


Your example page is completely invalid. Try adding a doctype, html, head and body tags and try again.

(Having said that, it looks fine in IE.)


Float the LIs, don't make them inline.

#widget_container ul {
    padding:0;
    list-style-type:none;
    }
#widget_container ul li {
    padding:0;
    margin:0;
    float:left;     
    }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜