IE 6 bug, looks like peekaboo

Discussion in 'CSS' started by qube99, May 9, 2008.

  1. #1
    IE 6 Only

    I have encountered something similar to peekaboo at the link below. A dropdown menu is hiding behind form elements.

    I've tried everything I know of to no avail so I need to learn something new.

    I would appreciate it if you'd share your thoughts and experiences on this issue.

    Once again, the bug is in IE6 only.

    http://www.youranimalstuff.com/mm5/merchant.mvc?Screen=CTGY&Category_Code=DOG

    [​IMG]
     
    qube99, May 9, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just a guess but maybe try setting a z-index
     
    wd_2k6, May 9, 2008 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'm surprised IE7 isn't doing this too. There are possibly two things going on, but unfortunately I think it's the bad one.

    There is an IE bug involving z-index where everything starts at 0 or 1 instead of "auto" thus a high z-index on submenus does nothing until the high z-index is moved to the parent instead. Stomme IE.

    However it's more likely to be the IE layer thing. IE starts the page like everyone else, position: static having z-index of 0, but Flash and form controls get "redrawn" starting at a whole new level. So no matter how high you z-index that submenu, it can never move up to the next "level" so never above the form controls.

    Paul O'Brien says the only way to truly get around this, if you don't change the layout of the page, is something called an iFrame shim. iFrames also start on a new "level" and thus could push a copy of the submenus up above the form controls. I've never used one, I'm allergic to frames, but Stu Nichols has done one and possibly Paul has too, though I'm sure Stu's is quite large code-wise. Google "iFrame shim". There are a few of them out there.

    When I had hover-spans getting covered up by checkboxes in IE, I rearranged the page as much as I could (actually, moved the spans and changed their size and shape to fit the new position) as all that work was easier than dicking with frames.
     
    Stomme poes, May 9, 2008 IP
  4. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #4
    Move the select box elsewhere, or stick an iframe under the dropdown. The latter can be hard-coded or apply with JS (like Stomme already said, there are more than a few solutions out there).
     
    VimF, May 9, 2008 IP
  5. qube99

    qube99 Peon

    Messages:
    75
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I got the iframe shim to work by putting it next to the TD instead of the TABLE where I first tried it.

    I needed a general solution because dropdown menus will encounter all sorts of forms on ecommerce websites. Changing the layout is almost never an option.

    Thanks for sharing! It was a big help.

    I wonder, could an iframe shim be used to layer some CSS on top of a Flash movie? Hmmm...
     
    qube99, May 9, 2008 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Heh, yeah, the iFrame is also used for Flashes too. Like I said, IE starts both iFrames and Flash in a new "layer". Why z-index doesn't usually help-- but with Flash, always try wmode="transparent" on your params and the highest z-index you can FIRST since iFrame is extra bs clogging up your page if you can get away with something else as above.
     
    Stomme poes, May 12, 2008 IP
  7. qube99

    qube99 Peon

    Messages:
    75
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Stu Nichols cooked a very tight javascript that eliminates all extra HTML except the iframe tag and uses no CSS. Solves peekaboo for all circumstances as far as my tests show. Says he'll post it on his site soon.
     
    qube99, May 12, 2008 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hmm, so those without Javascript get...? Just to keep them in mind. Otherwise, if it makes your code leaner, more power to you. And as far as I know, this isn't peekaboo. It's more of IE's (specifically coded) layering and z-index calculating thing. I know that iFrames were very purposely made to make a "new layer" in IE5.5 (or was it IE5.0?).
     
    Stomme poes, May 13, 2008 IP