Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    stacking order problem

    Dear all,

    I have a question about stacking order. I'm using a multi-level-menu library, javascript that converts an <ul> tag into a nice menu.
    However, the sub-menus, while hovering with the mouse, fall below an image I have in my page. I'm really lost googling around about z-index and stuff, so I hope somebody has a good suggestion for me.

    First I have the menu in my source, it is like this:
    <body> <div id=topmenu> <ul> <li> <ul z-index: 100 position: absolute> <li> <a> <span>

    Later, I have the image, like this:
    <body><form><table><tbody><tr><td><table><tbody><tr><td><div id="imgdiv"><img id="theimg" position: static>

    Now, I ALWAYS want the topmenu on top of everything else.
    In Firefox (version 3) it works like this, perfectly.
    However, in both IE6 and IE7 the menu is behind the "theimg" image (and behind some other things in my page).

    Does anybody know how to fix this?
    The position: static is added by a JQuery plugin to my img (to be able to resize the image).

    Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Read "Why tables for layout is stupid?" first, then Validate your code and fix the errors in your markup, if any.

    PS: welcome to CF.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Some code would be useful. But generally z-index:?; is what controls the layers.

    Google z-index.

    This is one result.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •