Searching...
Friday 26 July 2013

How to Make An IFrame To Contain Another Blog On Your Blog Page

When you want to merge two websites (either or both being a blog), yet keep the content of each separate, the most obvious solution is to use the same template on each, and link between the two in a consistent fashion. The reader of either blog never has to know when he's viewing the other, unless he habitually observes the content of the browser Address window.

But how about if you would like to display one blog, in its entirety, in the middle of the other blog page? That's a feature called an IFrame. It's a deceptively simple solution too.

<iframe width="100%" frameborder="0" src="http://bloggerstatusforreal.blogspot.com/2007/11/make-iframe-to-contain-another-blog-on.html" height="400"></iframe>


You can put an IFrame in either a blog post, or in a special page element. It's a dynamic window; when you change something in the blog contained in the window, the contents of the window changes too. Just refresh, and you can see the change.

An IFrame is a nice substitute for a newsfeed, when you are including a private blog in another web site. Since a newsfeed isn't available for a private blog, it's useless in this case. An IFrame works as well for a private blog as it does for a public blog. Of course, an IFrame will be useful only with viewers who have access to both the source, and target, web site.

One caveat here, which may be an asset or a liability, is that the content of an IFrame won't be picked up by the search engines. If the text inside the iframe is important content that needs to be indexed with the host blog, you won't want to put it inside an iframe. On the other hand, if you have text that you explicitly do not want indexed, an iframe can be a perfect solution.

It's got a number of settings that can make it more useful to you. You can set the height and width of the IFrame, to determine how much screen space, inside your blog, that you wish to use to display the IFrame contents. If the IFrame contents are larger than the allocated space, by default you'll get scroll bars; these can, at your own risk, be deactivated.

Remember that, as the text size is varied by the reader, the overall size of the contents inside the IFrame will vary, just as the contents of the blog outside the IFrame. Instead of specifying an absolute height or width in pixels, you can specify either in %, and have the IFrame size decrease or increase as the reader necessitates.

Depending upon what effect you desire, you'll want either the IFrame host web site, or the source web site, to be as plain as possible. If you have a normal blog with a page header, post column, and one or two sidebars, you will want the IFrame source web site to have a very plain template. For instance, if you're creating a second blog to contain posts that will be accessible only to a select few of your readers, you'll want to display an IFrame that only contains a posts column - any page header, sidebar, and / or footer section will just take up valuable screen space on the host web site, or force excessive horizontal or vertical scrolling inside the iframe window.

0 comments:

Post a Comment

 
Back to top!