Jump to content
xisto Community
Sign in to follow this  
=DH=Freefighter

iFrame Using a iFrame in your website.

Recommended Posts

A iFrame (Inline Frame) allows your visitors to view another page on your site without reloading the entire page.

 

Well you can also use normal frames and a frameset to do this, but the advantage of an Iframe is that u can place this Iframe at any place in your website.

 

 

The most important elements that can be used in a Iframe:

 

Frameborder

With frameborder u can adjust the thickness of the border around the frame.

 

Height

You can use pixels (example 250) or a percentage (example 55%)

 

Name

With this element you can give your iFrame a specific name, to refer to it using a link.

 

Scrolling

With this element you can deside if you want scrollbars to be shown with the Iframe. By putting YES the scrollbars always appear and when u put in AUTO, then the scrollbars only appear when your content page is too long or wide to fit into the iFrame. Ofcourse NO is also an option, then the scrollbars don't appear.

 

Src

This element contains the address of the contents page that you want to see in the iframe.

 

Width

You can use pixels (example 550) or a percentage (example 60%)

 

a sample of an Iframe:

 

<iframe frameborder="1" height="250" name="frame1" noresize="1" scrolling="yes" src="http://your-site.com/home.htm" width="550"></iframe>

U can put the Tag above at any place in the BODY of your website and you can use as many iFrames as u like, just by giving each iFrame another name.

 

To open a new page in your iFrame u can use this link for example:

 

<a href="http://google.com; target="frame1">link to google</a>

When u click the link in this case "link to google", the google searchpage will be shown inside your iFrame.

Share this post


Link to post
Share on other sites

The only problem with using iframes inside a website is that google will not search those iframe pages. I have created websites which used iframes to present information and the normal page was only graphics. This was a very big mistake for google never was able to access my text information. Beware when using iframes.

Share this post


Link to post
Share on other sites

The only problem with using iframes inside a website is that google will not search those iframe pages. I have created websites which used iframes to present information and the normal page was only graphics. This was a very big mistake for google never was able to access my text information. Beware when using iframes.

<{POST_SNAPBACK}>


the reason behind this is Google recognizes linked url's only (e.g. <a href="http://www.com/;, etc..) when crawling a certain page...so <iframe src="xzx.htm"> wont work...Google doesnt crawl Frames too (without those direct links). If you want a certain page to be crawled by Google..you should add a valid link directing to your iframes... you could put simple links like..

 

<a href="http://forums.xisto.com/no_longer_exists/ here to view this in full window</a>

lastly set your META's the right way. Avoid spamming keywords and follow standard word lengths..and you will be ranking good in Google. :)

Share this post


Link to post
Share on other sites

I'm alittle confused, does that mean adding [http://] links to every link in your website that's directed to the iframe?? I use an iframe in my main section & all links are directed to it. Other than that it's totally convieniant.. :)

Share this post


Link to post
Share on other sites

I'm alittle confused, does that  mean adding [http://] links to every link in your website that's directed to the iframe??  I use an iframe in my main section & all links are directed to it.  Other than that it's totally convieniant.. :)

<{POST_SNAPBACK}>


not really..a single page with a link to your iframe is enough..just be sure to set robots the right way.....

 

<META NAME="ROBOTS" CONTENT="index,follow"> :)

Share this post


Link to post
Share on other sites

the only reason i'd use an iframe is for the scrollbar. haven't found a way to display a scrollbar in a table cell. otherwise, using tables should be the way to layout your page and position things.my first site used an iframe. you can still see it at http://forums.xisto.com/no_longer_exists/ iframe is the little box with the text. you can see the source and copy & use it, by rightclicking just next to the border and then choose 'view source'tip: use the style: background: transparent. like that, you can see the background through your iframe, just like on my sitebad thing about iframes is that not all browers support it as well. my site looks cool on internet explorer, but netscape doesn't do a great job. mozilla & firefox do a better job. konqueror is fine too. i think the newest netscape does a good job too though.

Share this post


Link to post
Share on other sites

put it in a div, like this:
that's my code. the 'bummer!! my ... ' text is displayed when the browser does not support iframes. the allowtransparency will make sure the background can be seen through your iframe. but you have to set something in the page inside the iframe too (in this case: welcome.html). this is the body tag of the welcome.html file :

<body style="background-color:transparent; overflow:auto;" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>


and this is my code for positioning the iframe.

<div style="position: absolute;  width: 296;height: 284; left: 400; top: 116"<iframe name="chat" src="welcome.html" width="296" height="284" align="right" frameborder=no ALLOWTRANSPARENCY=yes>bummer!! my computerdetection system with neural emitting transponders tells me that your computer was constructed in the year 1492BC. what you should do? update your internet explorer/netscape. bye bye</iframe></div>



and toxic: i'll try it. but can you use html inside them???
code?

tnx!

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
Sign in to follow this  

×
×
  • 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.