Craig Hopson Posted May 2, 2012 Share Posted May 2, 2012 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 this ie what a messany ideas welcome..... Link to comment Share on other sites More sharing options...
Ingolme Posted May 2, 2012 Share Posted May 2, 2012 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 More sharing options...
Craig Hopson Posted May 4, 2012 Author Share Posted May 4, 2012 Sorry for the delay yes i have <!DOCTYPE> declaration what do you mean by setting the height of the <html> and <body> elements to 100% as well? Link to comment Share on other sites More sharing options...
Ingolme Posted May 4, 2012 Share Posted May 4, 2012 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 More sharing options...
Craig Hopson Posted May 4, 2012 Author Share Posted May 4, 2012 oh i see, no i didnt define html or body!!!so if i set it to PX instead of % it should be ok? Link to comment Share on other sites More sharing options...
Ingolme Posted May 5, 2012 Share Posted May 5, 2012 Setting the height in pixels will certainly make it work the same in all browsers. Link to comment Share on other sites More sharing options...
Craig Hopson Posted May 5, 2012 Author Share Posted May 5, 2012 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 More sharing options...
Ingolme Posted May 5, 2012 Share Posted May 5, 2012 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 More sharing options...
Craig Hopson Posted May 5, 2012 Author Share Posted May 5, 2012 Hmmmm thanks I'll look at a different way of doing what I want Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now