HTML Frames

richm8026

New Member
Messages
138
Reaction score
0
Points
0
I was wondering if I only need two files for frames? I do need more than one html page, it's going to be an about page, it's going to have an about page for me and an about page for a friend, I only need and index.html, and a mainsrc.html file for frames correct?? I looked online for some tutorials, I really didn't understand what they were saying...
 

alz4445

New Member
Messages
124
Reaction score
0
Points
0
For frames you have the page that the frame is on, let's say index.html, and then you will need another page to display the content inside the frame. (With the src="..." attribute)

So, on index.html,
HTML:
<iframe src="page2.html" width="500" height="500"></iframe>

And on page2.html,
HTML:
<h2>Hello</h2><p>Content goes here.</p>

That's just an example.
 
Last edited:

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Alright, so have all of my Links and stuff on index.html and rename leftside.html to something else? I wonder why I can't seem to grasp this stuff, LOL.. Then, I can display the stuff on index.html on the, lets say, index2.html file?
 

alz4445

New Member
Messages
124
Reaction score
0
Points
0
No, put all of your links and stuff on leftside.html, and on the index page, (Should be index.html ;) ) it would show up if you used this code.

HTML:
<iframe src="leftside.html" width="350" height="800"></iframe>

Hope you get it now ;) You can change the 'leftside.html', the width & height to whatever you want.
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Oooooooh, no need for:

Code:
<frameset cols="25%, 75*">

</frameset>

then?

There's a problem here, it's opening the content in the leftside.html instead of index.html

I put <Iframe src="leftside.html"></iframe>

in the index.html file, does that go in the body section, or above <body></body>,

I put a href="aboutrich.html" in the leftside.html file, maybe that's why it's not showing in the right pane?
 
Last edited:

alz4445

New Member
Messages
124
Reaction score
0
Points
0
Alright, just have a look at this.
You put it in the <body> tags where you want it to appear, if you don't have anything restricting the size, then it will just fill the whole page up.


index.html
HTML:
<frameset cols="25%, 75*">
<iframe src="leftside.html"></iframe>
</frameset>

leftside.html
HTML:
<a href="aboutrich.html">About Rich</a>
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
I'll never be able to pass that Online HTML Exam if I can't conquer this, frames is all I am lacking on, and I think I'll get it, what about JavaScript, are Frames harder in JavaScript, or about the same?
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Thanks, I got them working anyway, I read w3.org online and they said <frameset></frameset> isn't being used any longer, now they use JavaScript and CSS, I am not sure how they use CSS to do Frames, I looked in my CSS How-To book and there was nothing in there for frames..

After I clicked the home link, it just opens another frame, how do I stop that from happening?
 
Last edited:
Top