PDA

View Full Version : How do I put frames in me webby?


[NCP].TrAz
19-09-1999, 11:50
Help me please?

------------------
National car park?
:)
<N©Þ»T®@Z>

Qui
19-09-1999, 14:17
<html>
<FRAMESET rows= 130,* FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" NAME="oppmain">
<FRAME SRC="oppslist.htm" NAME="oppslist" SCROLLING=no frameborder=0>
<FRAMESET cols= 130,* FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" NAME="oppmain">
<FRAME SRC="oppexplan.htm" NAME="oppexplan" FRAMEBORDER=0 SCROLLING=auto>
<FRAME SRC="plain.htm" NAME="oppdetail" FRAMEBORDER=0 SCROLLING=auto>
</FRAMESET>
</html>

fairly simple http://www.wireplay.co.uk/ubb/teeth.gif

goto www.rebelz.freeserve.co.uk/default.htm (http://www.rebelz.freeserve.co.uk/default.htm) and view the source for a better set of code.
must be in <head> tags, and
the first line is
<frameset (rows or cols) = "sizes,second size, third" frameborder="size of border around frame" framespacing="size of framespacing">

second line, links to the actually file inside teh frame

<frame src="filename.htm" name="name of frame(used for linking purposes)">

repeat teh above line for the number of files in frames.

Take a look a look at the above named site for more info.

Im sure none of that makes sense, Ele? explain this to him in english will u? (ur used to talking to simple folk (well it sounds like thats what u do at work http://www.wireplay.co.uk/ubb/smile.gif).

Thanx.

Regards,


Qui

Elethiomel
19-09-1999, 15:17
Heheh..ta for that Qui. The easiest way to learn to do frames is to go here (http://junior.apk.net/~jbarta/version.html) , and grab the tutorials. There's one on frames, one on tables and one on basics, and lots of other stuff too.

Basically, (as it was explained to me) the FRAMESET declarations replace the usual BODY declaration - and although everyone keeps saying that they should be in the HEAD container tags, the tutorials I've read say they're not. Um. Definitive answer to that one someone?

The numbers that Qui's put in tell it how many pixels to use for the frame, and the * tells it to make the next frame elastic.

Erm. This is Qui's code in the format you'd usually write it (and with the missing /Frameset closing tag put in http://www.wireplay.co.uk/ubb/tongue.gif)

<BLOCKQUOTE><font size="1" face="Arial, Helvetica">code:</font><HR><pre>
&lt;html&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;The Main Frame Page&lt;/TITLE&gt;
&lt;/HEAD&gt;

&lt;FRAMESET rows= 130,* FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"&gt;

&lt;FRAME SRC="oppslist.htm" NAME="oppslist" SCROLLING=no frameborder=0&gt;

&lt;FRAMESET cols= 130,* FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"&gt;

&lt;FRAME SRC="oppexp.htm" NAME="oppexplan" FRAMEBORDER=0 SCROLLING=auto&gt;

&lt;FRAME SRC="plain.htm" NAME="oppdetail" FRAMEBORDER=0 SCROLLING=auto&gt;

&lt;/FRAMESET&gt;

&lt;/FRAMESET&gt;

&lt;/html&gt;

[/code]

What this tells the browser is to first of all split the window into 2 frames (that's the &lt;FRAMESET ROWS=130,* etc.&gt; bit. (I'd usually put the COLS one first, but each to their own...). The frames are divided according to the numbers - the first frame is 130 pixels tall (from the top of the window) and the second frame is what's left over (it's important to use those *'s - you'll make a right pig's ear of a page if you don't).

Now we tell the browser what to put in the first frame (that's the one that's 130 pixels tall):

&lt;FRAME SRC="opplist.html" NAME="oppslist" etc&gt;, and call it "oppslist" (the name is so that we can change the URL in that frame witout affecting the others, or at least that seems to be it's most practical use...you can use it in Jscript too. Now that we've done that, we're onto the next bit. But instead of putting a source file in, we want to split this frame again, so we put another &lt;FRAMESET&gt; tag in, like so:
&lt;FRAMESET COLS=130, * etc.&gt; (the other attributes do stuff, but it's more important to understand the basics before fiddling with attributes)

So now we're saying "Take the frame that we defined as elastic before (*) and divide it again - into 2 frames, one of which is 130 pixels WIDE (we've used COLS= rather than ROWS= this time), and the other fills what's left. What this would give us in practical terms is a page that looks a bit like this:
<BLOCKQUOTE><font size="1" face="Arial, Helvetica">code:</font><HR><pre>
___________________
|oppslist |
-------------------
| o|oppsdetail |
| p| |
| p| |
| e| |
| x| |
| p| |
-------------------
[/code]
I've put the names in to try to make it clearer what we're doing to it.

so what we've done is divided the screen up, and then told the browser what to stick in them. The FRAMESET tags equate to individual BODY tags for each frame, and the FRAME SRC tags tell the browser what you want in the frames.

Simple? Erm. Yes, well. Just read the tutorial and all will become clear http://www.wireplay.co.uk/ubb/smile.gif.

Ele


[This message has been edited by Elethiomel (edited 19-09-1999).]

Elethiomel
19-09-1999, 15:17
Well not only was the entire thing b0rked, but it double posted as well. Damn thing.

[This message has been edited by Elethiomel (edited 19-09-1999).]

Qui
19-09-1999, 16:25
thanx Ele, u always did have a knack to talking to simple ppl,
or should that be simple Ele talking to ppl?
or Ele talking simply to ppl

ahh thats it!!!

Regards,


Qui

PS Ta Ele, even i understand now http://www.wireplay.co.uk/ubb/smile.gif http://www.wireplay.co.uk/ubb/teeth.gif

[NCP].TrAz
19-09-1999, 20:07
Thanx guys
Qui u HTML god
http://www.wireplay.co.uk/ubb/smile.gif
cheers


------------------
National car park?
:)
&lt;N©Þ»T®@Z&gt;

Qui
19-09-1999, 20:50
no probs,
Thanks to Ele, for making my bumblings understandable to the mortal ppl here....

http://www.wireplay.co.uk/ubb/teeth.gif