• 0

Some basic HTML help...


Question

So I just have a little personal page on angelfire ( don't make fun of me ) And I have been doing it for a couple years now. Never really learned all that much though. Anyways, how I have it setup now the menu is on the left with the content window to the right, and thats how I want it. Here's where my problem is. In order for this to work on every page in my site is to make 2 pages for it ( ie - index.html and index2.html...index being the sidebar and index2 being the content to the right) So in order to have the sidebar and content for every page ( section ) on my site I have to make 2 pages. Then if I want to add somthing new on the sidebar I need to go through every page and make the changes indivdually, which is a GIANT pain in my butt. So if anyone could provide some html that would just let me use 1 sidebar and open all the pages from that it would be such a help you don't even know. I hope I made this clear of what my problem is. Thanks in advance for the help... :D

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

All you need to do is set up a system of frames, which if done right will be clean and efficient, otherwise it will look horrible.

Now, you'll need a third page set up, call this mainIndex.html and in it place the following code

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Audiovents Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<frameset rows="*,1" cols="175,*" framespacing="0" frameborder="1" border="0">
  <frame src="index.htm" name="index" scrolling="auto" noresize="noresize" id="index" />
  <frame src="index2.htm" name="index2" scrolling="auto" id="index2" />
</frameset>
<noframes><body>
</body></noframes>
</html>

This will provide you with the frames. Now as you can see in the code, the sources for the frames are called index.htm and index2.htm, these are the pages you currently have. index.htm will contain the links and index2.htm will contain the content.

For each link in index.htm make it look like this to ensure that the content appears in the main frame (index2)

<a href="your_link_here.html" target="index2">

and thats it, now each page will have its own link bar and you only need to update the index.htm file with extra links when you create more pages.

Hope all this helps :D

Link to comment
Share on other sites

  • 0

Alright well first of all I would like to thank all of you...

Second I tried what you said to do ramesees and I couldnt get it to work...

I'm gonna post a link to my site and hopefully you can tell me what to do...

the | wolf | pak ( my site )

I hope you can help! Thanks!

Oh yea, and I think I put this in the wrong forum...sorry...

Edited by audiovent
Link to comment
Share on other sites

  • 0

Hi audiovent

I've been looking at your site, and you've kind of got the setup that I was describing. I'll be back later to help you with any coding issues you have so bear with me, ok. Its really not as bad as you might think, in fact with a little extra coding, you'll be able to have the effect you want

Link to comment
Share on other sites

  • 0

Hi AudioVent

Go here to see an example of a test site I threw together to demonstrate......

Best of luck with it :D

PS:- Here is the code for the mainIndex.html file, the one that sets up all the other frames, and is the one you call (ie is the link that you tell people to go to if they want to see your webpage)

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<frameset rows="100,*" cols="*" frameborder="no" border="0" framespacing="0">
  <frame src="top.htm" name="topFrame" scrolling="Auto" noresize="noresize" id="topFrame" />
  <frameset rows="*" cols="219,*" framespacing="0" frameborder="Auto" border="0">
    <frame src="index.htm" name="index" scrolling="Auto" noresize="noresize" id="leftFrame" />
    <frame src="index2.htm" name="index2" id="mainFrame" />
  </frameset>
</frameset>
<noframes><body>
</body></noframes>
</html>

Edited by ramesees
Link to comment
Share on other sites

This topic is now closed to further replies.