Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Thanked 0 Times in 0 Posts

    Creating a Master for a Web-site


    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

  • #2
    New Coder
    Join Date
    Jun 2005
    Thanked 0 Times in 0 Posts
    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...
    Last edited by stickfigure; 11-02-2006 at 10:20 PM.

  • #3
    Senior Coder
    Join Date
    Dec 2004
    Essex, UK
    Thanked 0 Times in 0 Posts
    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).


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts