how to do a simple thing (submenu type thing)

Discussion in 'Web Design and Development' started by jelloshotsrule, Nov 22, 2006.

  1. jelloshotsrule macrumors G3


    Feb 7, 2002
    i'm currently working on a simple website (just html, not delving into css, etc, as i know nothing about it..). what i want to do is have a portion on the left of the page that has section headers. and then a break. and then on the right, the accompanying text/content.

    above and below the sections/content, i have other static stuff. so, i don't want to have each section header be a whole different page. but i want it to just change the content section with each header that's selected.

    here is what i mean roughly... any thoughts on how to easily/best go about this would be awesome!

    Attached Files:

  2. janitorC7 macrumors 6502a


    Feb 10, 2006
    North Hollywood, CA
    ummmm well

    Either a database........ would work

    but this could be done quite easily with CSS

    however using just HTML you can do it with using frames, i.e. create each of them being a different page
  3. ac2102 macrumors member


    May 12, 2003
    Bristol - England
    I am afraid it is not possible to do this using only HTML (without frames, but this is not advised and would still require each frame to be loaded separately).

    One solution i have found (although never used myself) can be found here. It uses a mix of javascript and css, but all the instructions are there.

    If you are trying to build a website, it is well worth learning a little css. It really isn't that hard to pick up. I learnt mainly from, which is a fairly handy resource for most web design problems.

    Good luck with your project,

  4. pengu macrumors 6502a

    Mar 20, 2005
    Diddily Daddily...
    ideally, this would be done with XHTML, CSS2, PHP&MySQL with php "templates" or using PHP& MySQL with AJAX to reduce the amount to be loaded. either way, it's not going to be "just HTML".
  5. jelloshotsrule thread starter macrumors G3


    Feb 7, 2002
    thanks all! i guess i shouldn't have said "only html" and really "just keeping it simple"... i looked at the domtab stuff and it's cool, but probably not quite a fit. i talked to another developer who mentioned using <div> to do it, so i'll read up on that on the w3 school. thanks again
  6. ValGor macrumors newbie

    Feb 20, 2005
    Here is a good example how make layout you described without frames or iframes.

    Have fun.
  7. ddekker macrumors regular

    Sep 23, 2006
    LOL... hate to say it.. but I'd use wordpress, I use it on a few sites, minutes to set up and hours of fun..

  8. jelloshotsrule thread starter macrumors G3


    Feb 7, 2002
    what is wordpress exactly?

    and for those of you who said it can't be done with html... how would you recommend doing it? does showing/hiding <div> with dhtml and javascript make sense? i can't seem to get my head around it or find an example that is both simple and applicable. hmm
  9. NoNameBrand macrumors 6502

    Nov 17, 2005
    Halifax, Canada
    I would use PHP myself (and you don't need anything else), but you don't even need PHP, because:

    Server Side Includes (SSI) will do everything you want, assuming your host has it turned on or allows you to use .htaccess files.
    Apache 1.3
    Apache 2.0

    First, create one page template with some sample content.
    Then you split the header, menu and footer into seperate .html files, and include them in the sample page.

    <!--#include virtual="/header.html" --><!--#include virtual="/menu.html" -->
    <!-- Content goes here -->
    Hi, my name is Bob! This is my wife Alice! Here are our cats, King Ruffles and Spot.
    Thanks for visiting!
    <!--#include virtual="/footer.html" -->
    Duplicate the sample page for each section, ie


    Edit the menu.html file to point to the right pages.

    You can easily do the same thing with PHP, just it's now index.php, about.php, our_cats.php, etc, and the includes look like this:

    <?php include('header.html'); ?>
    include('menu.html'); ?>

    <!-- Content goes here -->
    Hi, my name is Bob! This is my wife Alice! Here are our cats, King Ruffles and Spot.

    Thanks for visiting!

    <?php include('footer.html'); ?>
  10. pengu macrumors 6502a

    Mar 20, 2005
    Diddily Daddily...
    SSI is great, if you know your server supports it, and if you're happy having to constantly edit the SHTML files every time you want to make a change.

    I would still suggest PHP/MySQL. It isnt as hard as people make it out to be, I taught myself enough in a weekend to write a basic web-based database backed app for my dad several years ago, and i've never looked back.
  11. jelloshotsrule thread starter macrumors G3


    Feb 7, 2002
    ok, so here's an update:

    i'm using dreamweaver to build the site, and i found the layers tool.. which basically has allowed me to draw layers (divs with positioning set) and then use an "onMouseClick" to show and hide the layers i need. i have gotten this to work on a test case in a page all by itself, with multiple layers in the exact same location location as each other (overlapping), all starting as hidden and then being shown/hidden with the link clicks.


    i can't figure out how to position these layers once i try to bring the concept to the actual page, which would have the layers in a specific position within the overall site. the default when you draw a layer in, is to make it absolute positioning, and that doesn't work at all, as my site is contained within a centered <div> of a fixed width.

    absolute doesn't seem like it would work to position it as you're resizing a window, etc.. and i can't seem to wrap my head around the concept of telling the div/layer where to be. uggh

    any help would be great...

Share This Page