CSS在firefox,chrome和ie上的功能不同

时间:2014-01-12 05:15:01

标签: css internet-explorer google-chrome firefox cross-browser

这与我网站上的徽标有关。我希望徽标中的怪物看起来好像坐在二级菜单上,因此我添加了以下代码。

#logo {position:absolute; z-index:20; margin-top:-5px !important;}
#top-menu {margin-left:300px;}

这是我想要的效果:http://i.imgur.com/5BMUMSF.png

然而,虽然这在chrome中运作良好。它在firefox和IE中不能很好地工作。有人可以帮忙吗?我试图在两个浏览器上干扰css,但是在一个浏览器中工作的东西不会转移到其他浏览器。

您可以在http://nomnom.sg

浏览我的网站

1 个答案:

答案 0 :(得分:0)

img#logo {
    float: left;
    margin: 0px 23px 0px 0px;
    display: block;
    position: relative;
    top: 13px;
    z-index: 11111;
}

ul#top-menu {
    float: left;
    padding: 25px 0px 0px;
    font-family: Arial, Verdana, sans-serif;
    position: relative;
    top: 20px;
}