开发者

opening a webpage within a webpage

i am trying to display a webpage within a webpage as you can see over here

http://www.yoursdproperty.com/index.php?option=com_jumi&fileid=8&Itemid=34

the top and left part is my site, and the stuff that is the main content in the middle is a different site. i may not be doing it correctly since it is not displaying it at size that fits.

the main content page is: http://www.mlsfinder.com/ca_sandicor/raphaelshapiro/开发者_如何学运维index.cfm


You will struggle to make this work perfectly for the following reasons:

  • You're trying to fit an 800px wide web page into a 700px wide div.
  • You cannot access the child frame's DOM to manipulate it because it's on a different domain.
  • You cannot rely on a consistent height for the child frame. Although it has a fixed width, users with different accessibility settings (such as default font sizes) could cause text to wrap and adjust the height of the document.

Although you can overcompensate for point 3 by increasing the height of the iframe to allow for any extra height, you can't really deal with point 1 without changing the layout (mainly the width) of your site.

If I were you, I would look into other avenues of adding the functionality you're looking for. Maybe by contacting the site owner and seeing if they can accomodate your needs.


You are doing it correctly, the page won't fit as it's a fixed width of 800 pixels, it will not squeeze down to fit in your page. So only option for you is to stretch your content area to 800 pixels.


Remove the width and height properties of the iframe tag. Adjust the width style property in the style property so that it is the correct size for the page. It appears that you need to make the iframe wider.

<iframe src="..." frameborder="0" style="width:800px;height:480px;" />

Another option, of course, would be to remove the 'scrolling="no"' from the iframe tag to allow users to use the scrollbar to see the entire inner page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜