正确的 CSS 布局、z-index 问题、自定义导航栏
我是网页设计新手。我正在学习 CSS,并且非常喜欢它的可能性。我的问题可能很简单,但我似乎找不到答案。
我希望 CSS 有一个良好的开端,这意味着拥有良好的布局。所发生的事情是我设计我的网站并将它们全部设置在 DW 中。我开始构建 CSS,当我测试它们时,我得到了 ie6、7 的 z-index 错误。我的东西以绝对和相对定位。事物出现/消失。我在固件中制作导航栏,因此它们是定制设计。它们与翻转效果配合得很好,将它们导出到 DW,然后我遇到了问题。
有人可以帮助我理解我的方法的错误吗?我可以向您展示代码是否有帮助?我知道我将成为 CSS 的全面支持者,因为我不想从表格开始学习,我听说过这个古老而复杂的系统的恐怖故事。
感谢您帮助这个新手。
I am new to web design. I am learning CSS and really like the possibilities of it. My problems are probably pretty simple fixes, but I cannot seem to find the answers to them.
I want to have a good start with CSS and that means having a good layout. What happens is I design my sites and get them all set-up in DW. I start building the CSS and when I test them I get the z-index error for ie6, 7. I have things positioned in absolute and relative. Things appear/disappear. I make my nav bars in FW so they are custom designs. They work great with rollover effects, export them to DW and then I get problems.
Can someone help me understand the error of my ways? I can show you the code if that will help? I know I will become a full on CSS proponent as I do not want to start off learning with tables, I have heard the horror stories of this old and complicated system.
Thanks for helping this newbie.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IE 中的 Z-index 问题非常令人沮丧。
您需要考虑包装元素的 z-index 与元素本身的 z-index 非常相似。
使用以下伪代码,在 IE 中,您需要确保菜单包装的 z-index 高于页面内容,即使菜单本身具有更高的 z-index -索引比其他一切都重要。它的行为就像元素中的元素开始一个新的堆叠顺序(忽略真正的 z 索引)。为了解决这个问题,包装器的 z-index 优先。
Z-index problems in IE are quite frustrating.
You need to consider the z-index wrapping your elements are much as you have for the elements themselves.
With the following pesudo-code, in IE you need to ensure the menu wrapper had a higher z-index than the page contents, even though the menu itself has a higher z-index than everything else. It behaves as if elements within elements start a NEW stacking order (ignoring the true z-index). To get around this the z-index of your wrappers takes precedence.