Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6884201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:28:40+00:00 2026-05-27T05:28:40+00:00

I am using the following code: <div id=trialwindow style=display:none; background-color: #ffffff; position:fixed; z-index:1000; top:40px;

  • 0

I am using the following code:

<div id="trialwindow" style="display:none; background-color: #ffffff; position:fixed; z-index:1000; top:40px; left:200px; height: 600px; width: 850px; border:3px solid #000000;">
<iframe src="game/game.html" style="border: 0; width: 100%; height: 600px;"></iframe>
</div>

This works fine in Chrome.

But, the layout in the iframe that gets loaded is totally messed up with Firefox(v7.0.1). I see the layout by using a click callback to set the display property as ‘block’.

If I do not work with display at all, it works fine. But I really need to be able to hide and display the iframe in question here.

This is the code for the display switching mechanism.

$('#trial').click(function() {
$('#fadeoutwindow').css('display', 'block');
var trialwindow = $('#trialwindow');

trialwindow.css('display', 'block');
// To stop bubbling
return false;
});

$('#fadeoutwindow').click(function() {
$('#fadeoutwindow').css('display', 'none');
$('#trialwindow').css('display', 'none ');              
});

Here, #fadeoutwindow is a div which covers all the other contents when the iframe shows up. #trial is an anchor tag.

Help?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:28:41+00:00Added an answer on May 27, 2026 at 5:28 am

    The answer to this is that setting display to none while loading causes elem.style.height, outerWidth(), outerHeight(), scrollHeight() and other such calls to return 0 in Firefox (and not Chrome/Safari). I was using these calls in the javascript to position the elements.

    So, for now, I am using a negative z-index to hide the iframe instead of a display setting to none.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code <?php $link= $_SERVER['HTTP_HOST']; echo <div id='link' style='position: relative; margin:
I'm using the following code to display two div containers after 3 minutes: /*
I'm using the following code to display a fusionchart inside a div tag. The
I am using the following code for 1) Display the changed content in DIV
I am using the following code to store values in aspx session. Code: $(div.menu_body
I am using following code for inserting comments: <div id=2 class=789678> <div id=dynamic2> <span
I'm using the following code-snippet extensively in my model templates. <div class=control-group> @Html.LabelFor(model =>
I am using the following code: $("#treeview").jstree(); $("#treeview").jstree('open_all'); With the following html: <div id="treeview">
I'm trying to generate the following html code using cl-who: <html> <body> <div id=cnt_1></div>
I using following code: var search = 'test'; if ($('#sku').find(search) ){ //alert(search); $(document).find(search).css('color','red'); <TABLE>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.