Solved

iframes that resize to screen resolution

Posted on 2008-10-23
4
977 Views
Last Modified: 2012-05-05
I am looking for good code that will resize an iframe to any user's screen resolution in ie7, firefox and google chrome.

I am currently using IFrame SSI script II from Dynamic Drive DHTML, but am finding that pages are being cut off on monitors where screen resolution is set smaller than 1024x768.

Can anyone help me out?

Thanks!
0
Comment
Question by:ekopelowitz
  • 2
4 Comments
 
LVL 8

Expert Comment

by:MatthiasVance
ID: 22784498
Why do you want the iFrame to be the user's resolution? There are also browser components in the way if you try to do this.

Kind regards,

Matthias Vance
0
 

Author Comment

by:ekopelowitz
ID: 22784929
Basically, I am looking for a way to dynamically adjust the height of an iframe so that when a user maximizes their browser window, the screen is not limited by the iframe. Without this code, the iframe cuts in the middle of the page and a (sometimes) unnecessary scroll bar.

Any suggestions are welcome.

Thanks!
0
 
LVL 8

Accepted Solution

by:
MatthiasVance earned 500 total points
ID: 22785089
Here's some simple example code, I don't know if it fits in your situation. If not, please give me some more detail about the page you're trying to resize the iframe in.

Kind regards,

Matthias Vance
<style>
* {
	margin: 0;
	padding: 0;
}
</style>
<iframe src="http://www.google.com/" width="100%" height="100%" frameborder="0">

Open in new window

0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question