menu links on a css page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

hi everyone

i have started creating a webpage using css / xhtml, with a 3 pane
layout - logo along the top, then a small left column with links to
different pages, and a right column for the content

i have a quick question about how i can make different content appear
in the right column when the different links are clicked on the left
menu column?  for example, about us, location , contact details..

i tried a javascript example (using the visibility variables) which
works to an extent, but if you click on a link twice the content
disappears and you have to click another link to get content back

id like to keep all the content in one file, instead of using
different htm pages for each thing

any ideas let me know? thanks

Re: menu links on a css page

On Sun, 11 Feb 2007 12:54:42 -0800, ben wrote:

Quoted text here. Click to load it

Try having a look here:
...not exactly your idea, but may be close enough for you to modify.

Re: menu links on a css page

Quoted text here. Click to load it

Put them on different pages, in separate .html files.

Instead of trying to stick all the content into one file, instead have
lots of files and share the stuff that needs to be shared (i.e. the
menus).  Web searching will tell you how.  The CSS is already easily
shareable by having an external stylesheet. The "framework" of the
pages is trivial and easily shared by cut-and-paste when you first
create them

Quoted text here. Click to load it

Of course you can do this, but not with CSS -- it's just the wrong
layer of technology to do it, it's about presentation not content.

This is basically a bad idea and you shouldn't do it. Starting with
the separate things separate and adding a little extra to share the
shared stuff works far better. The problem is that you're working hard
to re-invent frames without actually using frames, so you get most of
their disaadvantages too.

If you _must_ do it, then JavaScript and flipping the CSS display
property can do it quite well, provided that the user's browser is in
a mood to co-operate. You can even do it with pure CSS popups, but
these are very inflexible as to how much you can "pop".  You could
also use an <iframe>, which is probably the best of these basically
wrong-headed approaches.

Re: menu links on a css page

thanks for your replies... the first option looks cool but is it
possible to get an action after a click not a hover???

second post... after thinking about it i think you have a good
point... the layout code isnt all that long so i could just use
different pages and use a href links to each page...

i will be playing round with it today....... thanks

Re: menu links on a css page

Quoted text here. Click to load it
PHP includes should do what you want, try out the following code.
<?php include("somefile.php"); ?>
I hope that helps.
Regards Chad.

Site Timeline