Forum index / Computers / Iframe Help

Iframe Help

5 posts · page 1 of 1

post #1
07 August 2006, 20:16 UTC#1
Im making myself a personal site and I was wondering how to make an link open something in an iframe on the same page, so that I don't have to make multiple pages.

example of what I mean...

'index.php' with an iframe which contains all the content, named: 'index.html'
and usually it would be like....
'index.php' click on 'contact us' it opens...
'contact.php' with an iframe which contains the content name: 'contact.html'

I want it like this.....

'index.php' containing iframe of 'index.html'
click on a nav link 'contact us' makes this happen...
'index.php' with iframe of 'contact.html'

So that I don't have to make 2 files for each link.
Some help would be greatly appreciated. :smile:
post #2
07 August 2006, 20:25 UTC#2
I have no idea what u mean but to make a link open on the index page in an iframe use this code

<a href="xxx" target="iframe name">

that will open another page in the iframe on the index file

make sure your name your iframe.
post #3
07 August 2006, 20:53 UTC#3
Cheers, Tomm that is what I meant.

1 more thing, how can I make the background of the iframe transparent?
cos in firefox it works fine but in IE it has a white background. :-S
post #4
07 August 2006, 21:00 UTC#4
As your iframe tag use

<iframe src="xxx" width="100%" height="100%" name="xxx" allowtransparency="true" frameborder="0"></iframe>

And on all your content pages put this code in the head:

<style type="text/css">body,html{background-color:transparent;}</style>
post #5
08 August 2006, 00:59 UTC#5
Cheers dude, sorted.
There'll prolly be more stuff so don't close this just yet. lol :-)