Jump to content

iframe AND ie, tut!


Craig Hopson
 Share

Recommended Posts

hey been long time since had a HTML problem heres the code

<iframe name="Iframe" src="<?php echo $img; ?>" frameborder="0" style="width:95%; border:0; background-color:#ADADEB; height:100%; overflow:auto;"></iframe>

now this works great in FF but it look like thisff.png ie what a messie.pngany ideas welcome.....

Link to comment
Share on other sites

Does your document have a <!DOCTYPE> declaration?And if it does, are you setting the height of the <html> and <body> elements to 100% as well?

Link to comment
Share on other sites

When you set an element's height to a percentage value. It takes that as a percentage of the nearest ancestor that has a height that's already set. If you don't give the <html> and <body> elements a height, then this element won't get a height either.

Link to comment
Share on other sites

cool thanks for your help one last thing in my iframe i displaying photos how can i make the iframe a set size ie 600px X 600px yet the picture will fit the iframe perfect

Link to comment
Share on other sites

In the page that's inside the frame you can set the max-height and max-width properties of the image to 600px.. This, requires that the image is inside an HTML page.Instead of an iframe it might be good to try other methods such as Javascript and fall back to PHP.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...