Solved

iframes that resize to screen resolution

Posted on 2008-10-23
4
972 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now