Right now we will move on to Frames and iframes, As each one is different I will break them down and do them 1 at a time,
FRAMES
Frames - a frame is a page with in a page if that makes sense, Wildmedia’s main page has 3 frames,
- top
- left
- main
Why have I done this? – simply because you can code one frame to open in a nother and it saves reloading the whole site,
Example, on WM in the top frame I have all my links, once a link is clicked it loads the page in the main frame, no other page is reloaded,
Be low is the frame code
- Code: Select all
<HTML> <head>
<title>Frames part 1 </title>
<FRAME name=frames_1 src="frames_1.html" noResize scrolling=no>
<FRAMESET border=0 frameSpacing=0 rows=224,403,* frameBorder=NO colspan=2>
<FRAME name=top src="top.html" noResize scrolling=no colspan=2>
<FRAMESET border=0 frameSpacing=0 cols=193,580 frameBorder=NO>
<FRAME name= "left" src="left.html" noResize scrolling=no>
<FRAME name= "main" src="home.html" noResize>
</FRAMESET>
<FRAME name=bottom src="bottom.html" noResize scrolling=no frameBorder=NO colspan=2>
</FRAMESET>
</FRAMESET>
</HTML>
The code above give you this effect,
click hereOk you have already been show a lot about this with the past posts,
Here are the things we have done befor
- <title> </title>
- Colspan
- Sourcing
- And borders.
The colspan is just like with the tables. And you can have row spanning also, its done exactly how the tables are done.
The thing you may find most confusing is
- Code: Select all
cols=193,580
rows=224,403,*
This simply gives dimensions to each frame;
Cols – read from left to right
Rows - read from top to bottom
As u can see for the last dimention on the ROWS I used * (star), this is because I want the bottom frame (bottom.html) to fill what ever space was left on the screen,
For dimentions you can use, % of a page, defined numbers and *
Still winning? Hope so
Within each page you can do what you would normal do on any page, images, linking, linking images, all normal stuff seen as it’s a page after all
But one thing you might want to know is how you “target” a frame, by targeting I mean, when you click a link it opens in a defined frame. I will show you how,
- Code: Select all
<A HREF="http://www.wild-media.net" TARGET="main">
When you click this link on a page it would open in the frame with the name ‘main’ because that’s its defined target,
Even you if you want the frame to open with in its self you have to wright the frame name,
So if the link was in the top frame you would Wright
- Code: Select all
<A HREF="http://www.wild-media.net" TARGET="top">
I think that’s enough for now, I will move on to Iframes abit later on