Search code examples
cssiframeposition

right and bottom ignored when position fixed iframe


I have the following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head></head>
   <body>
      <iframe src="http://jl.evermight.net" style="overflow:scroll; display:block; position:fixed; top:10px; bottom:10px; right:10px; left:10px;"></iframe>
   </body>
</html>

how come my iframe doesn't fill the entire browser window leaving only a 10 px space between top, right, bottom and left of the browser window? If I replaced the iframe tag with a p tag, while keeping the style rule, then it works with the p tag.

It seems the iframe is ignoring my right and bottom css rule. How do I make the iframe acknowledge the right and bottom rule?


Solution

  • with

     position:absolute;
    

    works?