1

我创建了一个下拉菜单,IE7 决定在下拉选择的每个列表项之间创建一些边距,即使列表项没有边距或填充。

你可以在这里看到它:http: //www.condorstudios.com/stuff/temp/index.php

4

1 回答 1

1

You could solve this pretty quickly by setting the background color of the parent div to the same as the background color of the list items. You'll always find quirks with Internet Explorer and margins, padding, widths, etc.

This CSS should also work (IE pads all list items), but I'd test this first to see how it changes the layout on other browsers.

li {
    margin:0px;
    padding:0px;
}

Depending on how 'hacky' you want to get, there are ways of including CSS that only IE-6,7,8 will interpret: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/ Scroll down to the 'Hacks' section.

于 2012-08-14T18:44:32.400 回答