开发者

What's wrong with this iframe?

Currently I'm using this:

<iframe fr开发者_如何转开发ameborder="0" marginheight="0" marginwidth="0"
        height="100%" width="100%"
        src="http://www.google.com/search?q=<?php echo $plus ?>">
    </a>
</iframe>

No matter how much I increase the height percentage, it remains the same. The height doesn't change at all... Any ideas why?

This is related.


It will only span the height of the parent element.

So if this iFrame is in your html/body element without height definition it will default to the browser height.

http://www.xs4all.nl/~peterned/examples/csslayout1.html

If you don't want to use CSS you will need to define the height of the body tag and all child elements thereafter.


Did you try removing the </a> from the tags?

Also, 100% is going to fill the container element. Make sure you have position:relative; in your element's styles and you have their heights/widths setup properly.


You need to have a parent height. If your parent has no set height, what does 100% of that height mean? Try this:

html, body, #your_parent
{
  height: 100%; /* Or some other value. You get the idea, right? */
  width: 100%;
}

Change those percents to whatever you like, just have some height and width to reference to. Also, remove that </a> closing tag. It shouldn't belong there.

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜