Grow your CSS skills. Land your dream job.

Facebox Blues… (not working in IE for hidden divs)

  • # May 16, 2009 at 10:08 pm

    I’ve looked all around the world wide internet web system database… and I can’t seem to find a solution.

    Basically, I’m trying to show some display: none Divs through facebox. As usual and expected, it works flawlessly in FF. And as usual and expected, the divs aren’t displaying in IE. In Safari and Opera, too, as a matter of fact.

    Anyone know a way around this? I could try Thickbox I suppose… but I don’t know if there is the same problem?

    Thanks.

    # May 16, 2009 at 10:43 pm

    I’m not familiar with Facebox, but thickbox loads a HTML document in the pop up.

    Is that how Facebox is supposed to work: to show display:none divs?

    # May 16, 2009 at 11:50 pm

    It can. Thickbox even says it can as well.

    And it does, in FF. In the other big 3? No for some reason.

    I might try Thickbox and be done with it… :<

    # May 17, 2009 at 2:05 am

    Yea… I’m sorry I can’t be of more use.

    You said you were trying to display divs that were display none. Did you try instead displaying external HTML pages?

    # May 17, 2009 at 4:21 am

    Found how to fix it with Facebox.

    In order for a hidden div to be displayed in IEOperaSafari, you have to do an inline style, style="display: none;"
    and NOT in the css file. Makes no sense to me, but it works.

    So to sum up… Inline style only… Using the inline style and in the CSS will not work.

    # May 17, 2009 at 12:01 pm

    Sure. Good to know. Thanks for posting.

    Javascript’s display function in essence applies an inline style to the element. So it will replace a conflicting inline style if it already exists. It can’t replace the style if it’s located in an external style sheet…. and apparently that takes precedence in those browsers.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".