PDA

View Full Version : Help with page layouts


lyssa615
11-02-2007, 08:32 PM
I am designing a website from scratch on DW 8 and am completely new to this, so the only advice I have so far is from a few books.
I am a little confused as to the easiest/best way to create my page layouts in design view. Tables? Layers? I will have about 5 pages with the same header, footer and side bar. Should I save my header as a snippet? Should I create one page (without the body) and copy that code into each page thereafter? Obviously if each page will be the same up to that point, I don't want to have to start from scratch with each page (and I don't want to use a template either).

Jittor
11-09-2007, 02:23 PM
Hi lyssa615,

Sorry for the delay in this, your post got lost in the shuffle.

Many people do this a number of ways. you can use HTML, PHP, and CSS.

If you know CSS you can design your site and layout and then use it and HTML or PHP to add pages like a template.

For example, I desgned a page with a header, footer and side bar. I created each in a separate .php page from the body and used CSS for the placement and look/feel of those pages. Then in a new .php page I created the body and added the header, footer and sidebar where I wanted them using an this code:

<div id="header"><!-- #include file="header.php" --></div>

The <div id="header"> is in the CSS and tells where to place the file in the page and what is included in the file, such as the graphic for the header and where any text would go and what style and color that text is. The only thing on my actual header.php page is the text, everythign thing else is in the CSS

Now when I need to change something on my header it updates on all my pages. If I need to change the color, font type, or a graphic I can change my CSS and it updates on every page as well. I know you can do this with html to instead of .php pages but I can seem to remember the include code for that. I remember some of it but I don't want to give you false direction.

If you want to learn more on html and CSS have a look at the recent post for some advice on where to start:

http://www.dreamweaverclub.com/forum/showthread.php?t=26806