Solved

iframes that resize to screen resolution

Posted on 2008-10-23
4
984 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
email validation 9 48
Date on a table 16 34
SP inserts data with order number, then push the rest one order up 11 17
Check input text, Number 6 30
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

749 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