View Full Version : Creating a Master for a Web-site

11-02-2006, 09:23 PM

I've been working on this problem for a while and was wondering if anyone had some suggestions for me.

I'm incharge of a website (~130 pages), and I am trying to figure out if it is possible to create a "master" design that can be referenced in each html page. This would be something similar to the master slides you can create for Power Point Presentations (ie: everything on the master page [colors, backgrounds, pictures, side menues] goes onto each individual slide, and to adjust something on all the slides, you only have to change the master.).

I have tried to work with CSS and create something like this, but it is not as detailed as I would like, especially in regards to setting up a sidebar menu. I can adjust colors, fonts, ect... but I can't effect the actual layout of the webpage.

After doing lots of research, I'm beginning to wonder if this is even possible. Does anyone know of a situation like this, or some way of coding a "master" web page that can be called into every web page of a web-site?

If this is too vague, just let me know, and I'll try to clarify it more.

Thanks, ~ kaliska

11-02-2006, 10:18 PM
All I can say to you is PHP...
If I understand correctly, you are trying to make a website in which you can have a side menu or any other thing appear on all your pages and not have to indivisually edit each page, right?
If what I think is true, then you have to use the PHP include function and you have to have all you pages be .php pages, ofcourse before you do that you need to make sure your webhost supports PHP. Afterwards you can make take the code for the whole side menu and paste it into another .php file. you replace the code you just cut out with the code below:

<?php include("menu.php"); ?>

... And if your problem is completely different, then I just explained something for so reason... Oh well...

11-02-2006, 10:26 PM
CSS is for styling, HTML is for layout.

As stickfigure suggests, using includes is the best method. If you cannot use PHP then you can use .shtml if the server is configured correctly.

<!--#include virtual="navigation.txt" -->

eg. In the above example, navigation.txt would contain just the HTML for the menu (as in menu.php in stickfigures example).