1

I'm having real problems embedding an iframe into my blogger site. I must confess I don't understand any html and have been attempting to copy bits of code I've found from around the web. I want to embed a friends blog into my own, and need to crop it so that it looks neater. His blog has a fixed width but dynamic height as he adds more posts. I've been defining the height of the iframe to be really large so as to make sure it will always fit in his posts no matter how large. The problem with this is that when you click a photo in his blog, it appears miles off the screen, and you have to scroll down loads to find it.

Here is my test blog - damianp1.blogspot.co.uk the page in question is test.

Here is the code I've used:

<style type="text/css">

.blog-pager, .footer, .post-footer, .feed-links, #Attribution1,.comments, .sidebar
{display:none !important;}
.main-inner .columns {width: 110%;padding-left:0 !important;padding-right:0 !important;}

</style>
</b:if>
<style>]

</style>

<div class="post-outer" style="width:875px; color:#f6f6f6" >
<div id="outerdiv" style="width: 900px; overflow: hidden">
<iframe width="1300" style="position: relative; left: -205px; top: -34px" height="30000" 
src="http://wildlife-ramblings.blogspot.co.uk/" scrolling="no" frameborder="0"></iframe>
</div>
</div>

Is a solution to fit the iframe into a scroll-box so that any images clicked on would appear in the middle of this? How do I do this, or is there another solution?

Many thanks, Damian.

4

1 回答 1

3

你有理由要显示他的整个网页吗?为什么不只显示他网站的 RSS 提要?

否则,您可能希望像这样设置您的 iframe,但如果您使用 iframe 的网站在宽度或高度上大于您的网站,您将需要滚动或打开与 iframe 中包含的网站一样大的 iframe :

<iframe width="100%" frameborder="0" src="The blog URL Goes here" height="400"></iframe>

有一个方便的小工具可以将博客 iframe 添加到博客: http: //www.makingdifferent.com/online-iframe-generator-tool-for-blogwebsite/

于 2013-07-02T21:31:37.087 回答