The place where everyone hangs out, chats, gossips, and argues
User avatar
By Stephen.
#27278
Well it's only really part of a website I want help with and that is how do I get a scrolling menu thing down say the left hand side of the page so that I can have a menu in a small space and leave the main page open for other things?

Cheers,
Stephen.
User avatar
By Funky Drummer
#27285
Try asking Quanny (PM him here) - he's built up a really good website of his own, and one which I think incoproates that feature.

Rich~
User avatar
By Morals
#27310
You've got a few options here -

Firstly, you can use frames, and put the menu in the left hand pane - the problem with frames is that they can cause problems with things like search engines and some people don't like them - I'm not a huge fan myself but they are a simple solution, especially if you want the main area to scroll whilst leaving the menu visible at all times.

Secondly, you can use tables, and have the menu in a table cell positioned wherever you want - the problem here is that if the page scrolls, the menu will not be visible once you've scrolled down.

The other way is to have a 'floating' menu which can be implemented using javascript - see somewhere like the javascript source for more info on that - again, this is not without its problems - not everybody has javascript enabled and you have to consider cross-browser functionality - Netscape and IE don't always execute javascript the same way and this can cuase some interesting results...

If you want more detailed help by all means PM me and I'll help you out.
User avatar
By Funky Drummer
#27326
Sorry Morals - I intended to suggest he talk to you aswell as quanny, but completely forgot to type it in! :oops:

Sorry!
User avatar
By Sidders
#27371
Javascript is probably the best way, but frames are the easiest for beginners. This is how you do it:

Have a standard HTML file that says:

<FRAMESET COLS="15%,85%">
The 15% and 85% can be altered accouding to how much of the window you want the frame to take up.

Below that you put in the frame sources in order from left to right (or top to bottom) that you want the frames to appear. You'll need an HTML file for each frame, so have one 'menu.htm' file and a 'mainwindow.htm' file for example:
<FRAME SRC="menu.htm" name=menu>
<FRAME SRC="mainwindow.htm" name=main>
</FRAMESET>

In the 'menu.htm' page you will have your various links eg:
<A HREF="spoons.htm" TARGET=main>Spoons</A>
<A HREF="forks.htm" TARGET=main>Forks</A>

The 'Target' bit tells the browser to open the HTML file in the 'main' frame. You can obviously change the names of the frames to whatever you like.

It should be noted you can also have frames inside other frames, etc.

Hope this helps. Let me know of any trouble.
User avatar
By Morals
#27390
Frames can be really messy if you're not careful. If you do decide to use them, Sidla's code will give you the basic page layout but you may want to tweak a few extra settings - I'd suggest that instead of using percentages for the widths of the columns, you set the left hand column to a set width (in pixels) and make the right hand side scalable so that if the browser window is resized things don't get messed up. This way, even if the user reduces the size of the browser window the menu will always remain intact which is a nice touch. Also, to keep things looking tidy you may want to tweak a couple of settings:

example:

Code: Select all<frameset cols="150,*" rows="*" frameborder="NO" border="0" framespacing="0">
  <frame src="menupage.htm" noresize scrolling="NO">
  <frame src="mainpage.htm">
</frameset>


Setting the frameborder, border and framespacing attributes as above (first line) make the page look like one whole page - you may wish to change these setting slightly, it's down to personal preference.

The noresize and scrolling="no" attributes have been applied to the left hand frame only in the above code - again this is down to your own preferences but these attributes as they are shown in the above code stop users resizing the frames and also prevent any scroll bars appearing in the left hand pane if the user makes the browser window too narrow.

Remember that if using frames visitors to your site can't bookmark a particular page, only the whole frameset so they'll always see the home page first. There are other issues but I won't go into them here.

You can use tables instead of frames (for an example of this, see the main page of this here site) which will help with issues such as bookmarking - if you do that you're best off making a template that has the general layout and the menu, and then use copies of that which you can add text to before saving as separate pages.
User avatar
By Stephen.
#27401
Ok, thanks guys! I'll try out the different options and see what I can come up with!

Cheers,
Stephen.

P.S Anyone know Quanny's website address?
User avatar
By Morals
#27476
Maybe this is just me, but Quanny's website, the menu, remind you of a certain daytime game show hosted by Henry Kelly?
User avatar
By Funky Drummer
#27481
Bearing in mind I don't watch daytime TV........

no.
User avatar
By Chris
#27483
Morals wrote:Maybe this is just me, but Quanny's website, the menu, remind you of a certain daytime game show hosted by Henry Kelly?


It used to remind you of a certain moyles related website ...
User avatar
By Morals
#27484
Funky Drummer wrote:Bearing in mind I don't watch daytime TV........

no.



A certain game show from a while back - GOING FOR GOLD!!
User avatar
By Funky Drummer
#27485
ah...now I know where you're coming from!
User avatar
By Lawrie
#27486
moyles could present going for gold!!
User avatar
By Funky Drummer
#27488
now that WOULD be quality viewing, unlike this upcoming programme on channel five which I think will run dry after about a year or so, and I can't even watch cos I don't have C5.

Ah well...
User avatar
By Morals
#27491
I can see it now:

"What am I? I'm a liquid, brewed from hops, I'm fizzy, golden in colour and sold in pint and half point measurements...."