Possible Duplicate:
Is there a way to have content from an IFRAME overflow onto the parent frame?
I am looking for a possible workaround for the following situation:
There is an element with the “position: absolute” style inside a page loaded into an iframe element. According to the iframe specifics and several posts on this forum (Is there a way to have content from an IFRAME overflow onto the parent frame?), there is no way to show the “position: absolute” element outside the iframe boundaries.
However, there seems to be an exception: the native select/option element is shown outside the iframe borders:
MainPage.htm:
<iframe src="WindowPage.htm" style="height: 50px; width: 50px"></iframe>
WindowPage.htm:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</body>
</html>
Is there any possible style/settings (may be HTML5/CSS3, etc.) to achieve this behavior for the “position: absolute” element inside the iframe?
The short answer: no.
You really have next to no control over the contents of an iFrame, stylistically or otherwise. Anything that the source page’s CSS declares will trump anything you try anyway.
Plus, as mentioned in link mentioned in the comments, there are security implications around iFrames that make this kind of necessary.