 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
sthlmkatta
Joined: 04 Nov 2009 Posts: 4
|
Posted: Wed Nov 04, 2009 11:08 am Frameset |
|
|
|
Hi!
I want to use frames at my homepage but I dont know where to put the code! I have written the code for the page and I also have the code for the frames, but since Im using the BODY-tag its not possible to use FRAMESET in the same code, isnt that right?
Shall I link to another page in my BODY that links to FRAMESET or how do I do it?
Thanks!
/ Katarina |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Wed Nov 04, 2009 11:12 am |
|
|
|
| Can you post the code you have now? |
|
sthlmkatta
Joined: 04 Nov 2009 Posts: 4
|
Posted: Wed Nov 04, 2009 11:46 am |
|
|
|
This is the code Ive written:
<HTML>
<HEAD><TITLE>Restaurang Linneduken</TITLE><META NAME="keywords" CONTENT="restaurang, skärgårdsrestaurang,
saltsjöbadsrestauranger"></HEAD>
<BODY BGCOLOR="navy">
<FONT FACE="Monotype Corsiva" SIZE="4" COLOR="white">
<CENTER><H1> Restaurang Linneduken</H1><BR></CENTER>
<FONT SIZE="4">
Välkommen till hemsidan för Restaurang Linneduken, en skärgårdsinspirerad
restaurang nära havet. Här kan du få information om restaurangen, våra menyer och
kontaktuppgifter. Om du sedan klickar dig in på "Tips" kan du hjälpa oss att uppdatera
vår meny! Tveka inte att kontakta oss vid frågor eller funderingar! <BR><BR>
<CENTER><IMG WIDTH="300" HEIGHT="250" SRC="DSC00023.JPG" BORDER="5" HSPACE=30"><BR><CENTER><BR>
<A HREF="sida2.html"TARGET="dokument">Information<BR>
<A HREF="sida3.html"TARGET="dokument">Meny<BR>
<A HREF="sida4.html"TARGET="dokument">Tips<BR>
<A HREF="sida5.html"TARGET="dokument">Kontaktuppgifter<BR>
<A HREF="sida6.html"TARGET="dokument">Hitta hit!<BR></A>
<HR ALIGN="left"NOSHADE WIDTH="100%"SIZE"30">
<CENTER>Linneduken, 2009</CENTER>
</FONT>
</BODY>
</HTML>
This is the frame-code which I have in my book:
<HTML>
<HEAD><TITLE>Ramar</TITLE></HEAD>
<FRAMESET COLS="225, *">
<FRAME SRC="url"NAME="meny">
<FRAME SRC="url"NAME="dokument">
</FRAMESET>
</HTML>
How can I put in the frame-code in my code?
Thank you! |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Wed Nov 04, 2009 12:53 pm |
|
|
|
This is an example of how the frame page should look.
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Ramar</title>
</head>
<frameset cols="225, * frameborder=NO framespacing=0 border=0>
<frame src="meny.html" name="meny">
<frame src="sida.html" name="dokument">
</frameset>
<noframes><body>
</body>
</noframes>
</html> |
The page you supplied the code for in your post should be broken down into two pages, one for the menu which goes on the frame named "meny", and the rest of the code on a default page that will appear in the dokument frame until a link is clicked.
meny.html
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Menu</title>
</head>
<body>
<A HREF="sida2.html" TARGET="dokument">Information<BR>
<A HREF="sida3.html" TARGET="dokument">Meny<BR>
<A HREF="sida4.html" TARGET="dokument">Tips<BR>
<A HREF="sida5.html" TARGET="dokument">Kontaktuppgifter<BR>
<A HREF="sida6.html" TARGET="dokument">Hitta hit!<BR></A>
<HR ALIGN="left" NOSHADE WIDTH="100%"SIZE"30">
</body>
</html> |
sida.html
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>
<BODY BGCOLOR="navy">
<FONT FACE="Monotype Corsiva" SIZE="4" COLOR="white">
<CENTER><H1> Restaurang Linneduken</H1><BR></CENTER>
<FONT SIZE="4">
Välkommen till hemsidan för Restaurang Linneduken, en skärgårdsinspirerad
restaurang nära havet. Här kan du få information om restaurangen, våra menyer och
kontaktuppgifter. Om du sedan klickar dig in på "Tips" kan du hjälpa oss att uppdatera
vår meny! Tveka inte att kontakta oss vid frågor eller funderingar! <BR><BR>
<CENTER><IMG WIDTH="300" HEIGHT="250" SRC="DSC00023.JPG" BORDER="5" HSPACE=30"><BR><CENTER><BR>
<HR ALIGN="left"NOSHADE WIDTH="100%"SIZE"30">
<CENTER>Linneduken, 2009</CENTER>
</FONT>
</BODY>
</HTML> |
|
|
sthlmkatta
Joined: 04 Nov 2009 Posts: 4
|
Posted: Wed Nov 04, 2009 3:24 pm |
|
|
|
Thank you for your reply!
I divided the code and did a separate code for the frame. When I open the page in my browser, the page look just as before, even though I used the frameset code. Is there something that I missed?
Thank you again! |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Wed Nov 04, 2009 4:04 pm |
|
|
|
Did you name this page as index.html?
There was an error in my code...corrected (see below).
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Ramar</title>
</head>
<frameset cols="225, *" frameborder=NO framespacing=0 border=0>
<frame src="meny.html" name="meny">
<frame src="sida.html" name="dokument">
</frameset>
<noframes><body>
</body>
</noframes>
</html> |
This bit of code
<frame src="meny.html" name="meny">
will load a file called meny.html in the left column when the index.html is rendered by the browser. At the same time this file
<frame src="sida.html" name="dokument">
is loaded in the right column or dokument frame.
On initial load there will be three files loading, the page that holds the frameset code, the menu and the content. Make sure the file names match. |
|
sthlmkatta
Joined: 04 Nov 2009 Posts: 4
|
Posted: Thu Nov 05, 2009 6:42 am |
|
|
|
| It works now, thank you so much for the help! |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Thu Nov 05, 2009 7:07 am |
|
|
|
| Your welcome. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|