Hi
I have a fixed-pixel width IFRAME, the height of which I’d like to stretch/shrink according to screen resolution -which (I think) means using a percentage value (?).
Since dispensing with a table surrounding the iframe, and using a new doctype, I just cannot get the height of the iframe -even using it’s parent DIV -to be specified as a percentage -the browser just renders it really small.
In fact, the only reason I have the iframe contained in a div is to center it horizontally (I just gave up trying to centering it vertically!)
Could someone tell me where I’m going wrong? Have I come up against cross-browser bug for which I need a hack? Or perhaps I’m just clueless!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
...
...
<div style="margin-left:auto; margin-right:auto; width:750px; height:60%;"> <!-- height:percentage; :-( -->
<iframe id="content" src="news.xml" scrolling="auto" style="border-style:hidden; width:100%; height:100%;">
</iframe>
</div>
I’ve tried styling the iframe directly with no luck.
Thanks for any help.