CSS - IE8错误

时间:2013-11-28 06:02:38

标签: css firefox internet-explorer-8 cross-browser compatibility

我有一个wordpress网站,它面临Internet Explorer 8中的兼容性问题。http://www.sunsetbaycharters.net

导航菜单在IE8&中未正确加载IE7。

IE8中的Bad Nav

enter image description here

此外,我的网站中的内容框在IE8中不透明。我明白这是因为我使用的是RGBA,我需要知道如何修复它。

请告诉我如何在IE8和IE中修复导航菜单? IE7和rgba透明框。

导航菜单的CSS代码:

div#top-menu, div#top-menu.et-fixed {
    background-color: white;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.8);
    height: 80px;
    text-align: center;
}

1 个答案:

答案 0 :(得分:0)

对于内容框背景透明度,您必须使用背景图像(因为IE8不支持透明度)。只需要制作一个5x5平方的PNG颜色/透明度,然后将其设置为背景重复。例如:

.target-element {
    background-image: url('images/your-transparent-tile.png');
    background-repeat: repeat;
}

至于盒子间距问题,你必须看看你的CSS。这可能与IE8缺乏display: inline-block支持有关。