# Solved: Customize IFRAME



## caraewilton (Nov 7, 2007)

Hi guys. I am hoping someone can help me.

I have created a web page for my students using google page creator (free hosting . . . what can I say).

I have used an Iframe to embed a blog on my site as can be seen here:
http://chisinfotech.googlepages.com/igcse2

I used the following code to do this:
http://itigcse2.blogspot.com/

I would like to get rid of the box look and scroll bar so that the overall effect looks like this:
http://sureshn.com/
look at her blog page. She has masked her address so I can't give you the direct link.

At the very least I would like the width of the IFRAME to extend for the width of the original blog and to adjust automatically. I have played around by setting the width = 100% but this just results in a small width of about 200, scroll bars still visible.

A second question, not as important, how can I set my blog so that the comments show. At present a person must click on the comment link for each post which opens up a window revealing the comments. My blogs are hosted by blogger. I am using the simple template, can't remember it's exact name.

Thanks in advance
Cara


----------



## tomdkat (May 6, 2006)

caraewilton said:


> I have used an Iframe to embed a blog on my site as can be seen here:
> http://chisinfotech.googlepages.com/igcse2
> 
> I used the following code to do this:
> ...


First, the iframe tag doesn't have a "border" attribute. It uses "frameborder" instead. Try changing border="0" to frameborder="0" and see if the iframe border goes away. As for the scroll bars, you'll need them since there is more content in the iframe than height of the iframe. It sounds like you want a browser level scrollbar to scroll the entire page so the iframe contents is visible without having its own scrollbar.



> At the very least I would like the width of the IFRAME to extend for the width of the original blog and to adjust automatically. I have played around by setting the width = 100% but this just results in a small width of about 200, scroll bars still visible.


iframes don't dynamically scale, as you would want (as far as I know). However, you can use JavaScript to change the dimensions of the iframe, as you see fit. The problem with this is you'll need to know the exact dimensions for the iframe to resize it. I've done this on a site already and it mostly worked (much to my surprise  ).

Peace...


----------



## Jayec (May 6, 2008)

Suresh has used his own Theme/Template on Blogger to make his blog look like his Google Pages site (http://sureshn.blogspot.com/2006/07/creating-complete-personal-website.html).


----------



## caraewilton (Nov 7, 2007)

tomdkat said:


> First, the iframe tag doesn't have a "border" attribute. It uses "frameborder" instead. Try changing border="0" to frameborder="0" and see if the iframe border goes away.


Okay this worked, got rid of the box look Thank you. An improvement already



tomdkat said:


> iframes don't dynamically scale, as you would want (as far as I know). However, you can use JavaScript to change the dimensions of the iframe, as you see fit. The problem with this is you'll need to know the exact dimensions for the iframe to resize it.


This is not an option. The reason I have created the blogs is because I intend to post weekly homework assignments and a blog is much easier to update than the GPC pages. Thus if the size is increasing every week, I don't want to then have to go to GPC anyway to adjust the size of the iframe.

Maybe someone can think of a completely different way to accomplish a scalable, embeded blog


----------



## caraewilton (Nov 7, 2007)

Jayec said:


> Suresh has used his own Theme/Template on Blogger to make his blog look like his Google Pages site (http://sureshn.blogspot.com/2006/07/creating-complete-personal-website.html).


Yes I realized that, but it must be possible to embed the blog in the webpage like she has...unless she changes the iframe dimensions in her webpage every time she updates the blog.


----------



## tomdkat (May 6, 2006)

caraewilton said:


> This is not an option. The reason I have created the blogs is because I intend to post weekly homework assignments and a blog is much easier to update than the GPC pages. Thus if the size is increasing every week, I don't want to then have to go to GPC anyway to adjust the size of the iframe.
> 
> Maybe someone can think of a completely different way to accomplish a scalable, embeded blog


Well, the sample site you posted a link to *does not* have the blog in an iframe, as you're wanting to do. Instead, the blog is in a normal page with the navigation at the top being in an iframe. Additionally, the blog being displayed is the blog itself, meaning when you click the "Blog" link, you're going to their Blogspot.com page directly.

You will have to find a way to scroll your iframe. There ARE options available, like this one. I've used this on a website I helped a friend create and it works well. We've got content in iframes and use this script to scroll them without having the iframe scrollbar displayed.

Set the "scrolling="No"" attribute on your iframe to turn off the scroll bars and then deploy this script (you'll need to find some icons to scroll the iframe) and that could be an option you could use.

Another option would be to convert your live blog into static HTML that is embedded in your page. If you used PHP or JSP to dynamically generate your HTML page, you could have the server-side script effectively "import" your blog and write it out as part of the HTML it generates and it would appear in the browser as a single page.

Peace...


----------



## caraewilton (Nov 7, 2007)

Oh I see. So all she has done has customized her blog to look like her webpage and because she is masking the google server, the url displays as her webpage. Mmm, sneaky. So she is not so clever after all, or she is very, depending on ones point of view.

Thanks for the PHP or JSP suggestion. Unfortunately google only supports static pages

Thanks again. I think that now I have got rid of the box look, I am prepared to live with the scroll bar. It is not the end of the world. Really do appreciate you suggestions though


----------



## tomdkat (May 6, 2006)

caraewilton said:


> Oh I see. So all she has done has customized her blog to look like her webpage and because she is masking the google server, the url displays as her webpage. Mmm, sneaky. So she is not so clever after all, or she is very, depending on ones point of view.


There's notthing "clever" or "sneaky" going on. When you go to the main URL, the site is loaded using traditional HTML frames and the actual GPC hosted page is loaded in the upper frame. 

Peace...


----------

