开发者

Correct CSS layout, z-index problem, custom nav-bar

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 th开发者_StackOverflow中文版em.

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.


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.

<-- page wrapper -->   (give z-index of 1) 
    <-- menu wrapper -->  (give z-index of 10)   
         <-- menu -->    
    <-- end menu wrapper --> (give z-index of 2)   
    <-- page contents -->    
    ...    
    <-- end page contents -->    
<-- end page wrapper -->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜