Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jelloshotsrule

macrumors G3
Original poster
Feb 7, 2002
9,596
4
serendipity
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!
 

Attachments

  • example.jpg
    example.jpg
    68.2 KB · Views: 117
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
 
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 w3schools.com, which is a fairly handy resource for most web design problems.

Good luck with your project,

ac2102
 
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".
 
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
 
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

Here is a good example how make layout you described without frames or iframes.

http://www.fu2k.org/alex/css/frames/percent

Have fun.
 
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..

DD
 
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..

DD

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
 
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.

Code:
<!--#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

index.shtml
about.shtml
whatever.shtml
grocery_list.shtml

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

PHP
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:
<?php include('header.html'); ?>
<?php 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'); ?>
 
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.
 
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.

however.

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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.