The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS bring a Div on top of the IFrame

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #44314

    I have an application where I have used a IFrame to display the editable contents of my application. the Mainmenu is outside the IFrame and on clicking any menu options in the main menu it changes the contents inside the IFrame. the application is built on 4.0. On the Parent HTML page when the mainmenu is present i have placed a div which is used to overlay the entire page when the user session is timed out. this overlay feature works fine with out IFrame, but it is not able to push the IFrame and its content to back. I even tried using the z-index properties to push the content back but still it is of no use.
    I wanted to bring a Div (It contains an image) on top of the IFrame.
    Please find the JQuery code which is getting called on Session Timeout of the logged in user.
    function OnTimOut() {
    $(“#AppIFrame”).css(‘z-index’, ‘-10000000’);// reducing the Z-index for the iFrame
    $(‘#overlay’).fadeIn(‘medium’, function () {
    ‘top’: ‘160px’,
    ‘zoom’: ‘1’,
    ‘filter’: ‘alpha(opacity=50)’,
    ‘opacity’: ‘1’,
    ‘z-index’: ‘500000000000000000’
    }, 500);
    $(‘#overlay’).css(“display”, “block”);
    $(“html”).css(“overflow”, “hidden”);

    Any help would be much appreciated.


    You’ll need to show the CSS in order for us to find out what could be wrong.

    In general, it shouldn’t be a problem to have a DIV placed on top of an iFrame:


    For z-index to work properly you will need both elements to be positioned either relative or absolute.

    Is the issue repeated in all browsers?


    Or position fixed*

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.