简体   繁体   English

为什么菜单出现在Chrome和FireFox中,而不出现在IE中?

[英]Why does the menu appear in Chrome and FireFox, but not IE?

Why does the top category menu (Everything, Ballet Flats, Boots, etc) - div id="header-bar" - look great in FireFox and Chrome, but be hidden in IE unless you scroll down the page? 为什么顶部类别菜单(所有内容,芭蕾平底鞋,靴子等)-div id =“ header-bar”-在FireFox和Chrome中看起来很棒,但是在IE中隐藏,除非您向下滚动页面?

http://shoeporn.com http://shoeporn.com

Any help will be much appreciated :) 任何帮助都感激不尽 :)

It's positioned underneath (behind) the top bar. 它位于顶部栏的下方。 Either change the z-index to something bigger than the top bar, or change the top to position it below the top bar. 可以将z-index更改为大于顶部栏的值,或者更改top以将其定位在顶部栏的下方。

Its hidden in chrome as well. 它也隐藏在铬中。 The z-index is lower than the one of the background or something. z索引低于背景或其中之一。 Anyway add something like this to your header-nav: 无论如何,请在您的header-nav中添加以下内容:

z-index: 130;

I find setting position:absolute on #header-bar in this particular example to be poor practice. 我发现在此特定示例中,在#header-bar上设置position:absolute是不好的做法。 Consider changing that to 考虑将其更改为

#header-bar {
  position: relative;
  /*left: 0;
  right: 0;
  top: 44px; - remove these*/
}

This will maintain natural document flow; 这将保持自然的文件流; position:relative allows for dropdown positioning and maintaining rendering context (compare with removing position property altogether and see the dropdown menus going "behind" the shoe tiles) position:relative允许下拉菜单定位和维护渲染上下文(与完全删除position属性相比,并看到下拉菜单位于“鞋柜”的后面)

Rule of thumb: avoid absolute positioning if you can build without it. 经验法则:如果没有它,可以避免绝对定位。

For me its hidden in chrome too... anyway change this in css: 对我来说,它也隐藏在chrome中...无论如何在CSS中更改此设置:

#header-bar {
   top: 84px;
   z-index: 105;
}

remove z-index from #header-wrapper and add z-index:106 to #header-nav. 从#header-wrapper中删除z-index并将z-index:106添加到#header-nav中。

Hope it will help... 希望对您有帮助...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我的favicon没有出现在Firefox和IE中? - Why is it that my favicon does not appear in Firefox and IE? CSS菜单未在IE和Firefox中显示在正确的位置 - CSS Menu does not appear in correct place in IE and Firefox 为什么Chrome,Firefox和IE上的文本看起来比Safari模糊? - Why does text on Chrome, Firefox, and IE look fuzzier than Safari? 为什么这段JavaScript既可以在Google Chrome和IE上运行,又不能在Firefox中运行? - Why does this piece of javascript work on both Google Chrome and IE but not in Firefox? 为什么该页面在IE,Firefox和Chrome之间不一样 - Why does this page look different between IE, Firefox & Chrome 为什么基本标记似乎可以在Opera和Chrome中运行,而不能在Firefox和IE中运行? - Why does the base tag seem to be working in Opera and Chrome, but not in Firefox and IE? 为什么valign =“ bottom”在Firefox中不起作用,而在IE和Chrome中起作用? - Why does valign=“bottom” not work in firefox, and works in IE and Chrome? IE中的字体与Firefox和Chrome中的字体不同...为什么? - Font looks different in IE than it does in Firefox and Chrome…why? IE为什么要尊重标签CSS宽度,而不是Firefox或Chrome? - Why does IE respect label CSS width, but not Firefox or Chrome? JavaScript手风琴菜单可在IE而非chrome或Firefox中使用 - JavaScript Accordion Menu works in IE not chrome or Firefox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM