Jump to content
xisto Community
plumpShticks

A Question About Html Iframes Need help in iframe

Recommended Posts

We have an upcoming project in our class...I've a cool idea of lay out but i hav a problem. I'm using a lot of images. I need to embed my contents in those images (texts and graphics) using table cells... My friend told that there is a so called <iframe > tag to solve it but he doesn't know how.... Can you please send me some hot info about parameter and hows' of iframes? Samples would be great. Tnx...

Notice from Johnny:
Use a more descriptive title next time.
Edited by Johnny (see edit history)

Share this post


Link to post
Share on other sites

An iframe or an internal frame is a way of embedding another page within a web page. For instance if you have a page called iframe.htm with the following code in it:

 

<b> Hello </b>

and a page called index.htm with the following code in it:

 

<iframe src="iframe.htm" height="20" width="100"> Your browser does not support iframes and so this page cannot be displayed properly.</iframe>

If the browser supports iframes the Hello will come up with a nice big border around it and if it doesn't the error message will arise. I do not know how to remove the border.

 

Iframes are not recommended if you want your page to be indexed properly. They leave a border around the main content. An old webpage I created used iframes. Click here if you really want to see it.

 

If you ever have the opportunity to use php's include ""; function use that instead. Looks a lot cleaner and smarter and people won't know you've used it.

Share this post


Link to post
Share on other sites

Found out how you take away that ugly border round the iframe:

<iframe src="iframe.htm" height="20" width="100" frameborder="0"> Your browser does not support iframes and so this page cannot be displayed properly.</iframe>

Share this post


Link to post
Share on other sites

Cmat you forgot one thing, making links load content into them.

You need to give the iframe a name, using the name attribute.

<iframe name="frame"></iframe>

Then using the target attribute you can send the info into that frame.

<a href="#" target="frame">Link</a>

Share this post


Link to post
Share on other sites

Also, another thing:

If you want to open a link in the whole page from the frame, remember to set the target to _top
 



<a href="link.com" target="_top">Link</a>

Instead of _top, you can also use _parent (if you have many frames inside each other, you may need to use that one to only open in the parent frame)
 


Notice from cmatcmextra:
Edited as per request


Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

It sounds like you want to type and place content on top of the images, and to the best of my knowledge that can't be done with iframe, like they said iframe is dessigned to place a page inside a page, wich if you don't have php can be handy but if you can use php it is better to use include as cmatcmextra said.Umm if you do want to type ontop of the image there are really only two ways of doing this, the first being with a table as you entioned the other with css, and layers. The latter I can't help with but the table I can, post back if you would like me to elborate

Share this post


Link to post
Share on other sites

Wow this saved me from a lot of hard work. I was going to have to edit each and every page if I changed a link, now I can with an Iframe. But I needed to know how to make it open in the parent window. Thanks for the topic guys, it saved me from a LOT of work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.