|
|
Subject:
HTML / CSS Problem with relative positioned iframe and window resizing
Category: Computers > Internet Asked by: trimidium-ga List Price: $3.50 |
Posted:
20 Aug 2002 14:23 PDT
Expires: 19 Sep 2002 14:23 PDT Question ID: 56678 |
HTML / CSS Problem, I made a website that has an iframe for a "monitor screen". I want the monitor to be centered on the screen. The problem is when you resize the page the iframe doesn't move to the correct spot unless you refresh the page. What I need is either a fix for the actual iframe problem or a way to make the page refresh when somebody resizes the window. I do not want to make the page positioned absolute either, it must be relative so the page can be centered on any screen resolution. Click below to go to the problem page: http://www.gameserver.net/nav1024.php |
|
Subject:
Re: HTML / CSS Problem with relative positioned iframe and window resizing
Answered By: prophet-ga on 22 Aug 2002 14:15 PDT Rated: |
Hi Trimidium, There are many ways to accomplish what you'd like to do. Some involving DHTML tend to get quite complicated, so let's stick with the easy solution for now. The easiest way to fix your problem is to add an attribute to the <body> tag of your page. You have two options. You can change your tag from: <body style="margin: 2px;" bgcolor="black"> to: 1. <body style="margin: 2px;" bgcolor="black" onresize="history.go(0)"> or to: 2. <body style="margin: 2px;" bgcolor="black" onresize="document.location.reload()"> I think you'd prefer option 1, which performs a "soft" reload. This type of reload does not reset your form elements to their default values. Option 2, a "hard" reload, will reset the forms on the page. Cheers, Prophet |
trimidium-ga
rated this answer:
That did just what I needed it to, Thanks! |
|
Subject:
Re: HTML / CSS Problem with relative positioned iframe and window resizing
From: seizer-ga on 20 Aug 2002 14:34 PDT |
I imagine that Internet Explorer's layout engine wouldn't support that, but I'm not sure. Incidentally, your page doesn't render very well in Mozilla (v1.01) on WinXP- you have to scroll down one screen before anything appears. |
Subject:
Re: HTML / CSS Problem with relative positioned iframe and window resizing
From: lot-ga on 20 Aug 2002 15:50 PDT |
Seems OK on my browser Mac I.E 5.5 iFrame doesn't work with older versions of Netscape prior to 6.0 I believe. lot-ga |
Subject:
Re: HTML / CSS Problem with relative positioned iframe and window resizing
From: yeff-ga on 20 Aug 2002 16:00 PDT |
iframe is slow and not just a little bit evil. Use SSI or overflow:scroll; and have the text on the page itself. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |