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 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2004
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool layer over drop down menu...is it possible ?

    Hi,
    I have seen this problem on many sites and I have faced it in some sites I built. When trying to place a <div> layer over a drop down menu, the menu always shows up through it. I noticed that some sites use a trick to solve this problem by hiding the drop down menu when a layer is displayed...but this is not really neat...any ideas??

  • #2
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i'm not 100% sure what you mean without seeing an example but i think use of the css z-index attribute could be the solution to your problem.

    if you are unfamiliar a brief summary is that the object with the highest z-index value is displayed on top of items with lower z-index values

  • #3
    New Coder
    Join Date
    Oct 2004
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well I know obviously...that's how it SHOULD be but try out the following:
    Code:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    <div id="lay1" style="position:absolute; z-index:10;">
      <form name="form1" method="post" action="">
        <select name="select">
          <option>menu item 1</option>
    	  <option>menu item 2</option>
    	  <option>menu item 3</option>
        </select>
      </form>
    </div>
    <div id="lay2" style="position:absolute; z-index:100; background-color:#990000; width:200px; height:200px">
    Testing 
    </div>
    </body>
    </html>
    in IE, the drop down menu always shows up in front...whatever the z-indexs !! ...in mozilla it actually works.

    see the attached pic...or simply try it out urself

    thanks anyways
    Attached Thumbnails Attached Thumbnails layer over drop down menu...is it possible ?-layers.jpg  

  • #4
    New Coder
    Join Date
    Dec 2004
    Location
    Ontario, Canada
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A "Peculiarity" in IE

    As noted by this article IE renders select elements over top of any element positions in the same spot.

    They mention a fix for IE 5.5+ using iframes, if thats any use to you.

    Nite


  •  

    Posting Permissions

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