Log in

View Full Version : repeating contents of home page on every page of website



luckyros
10-14-2007, 06:03 PM
Hi,
I am designing my first website. I am facing one problem. I want the logo and horizontal and vertical menu as well as footer to be placed on every webpage that is loaded. Please can anyone tell me the idea about this ?

scorch
10-14-2007, 10:49 PM
either use CSS, in-line styles or iFrames

search for any of these topics on this forum

thetestingsite
10-14-2007, 10:53 PM
Or you can use PHP (or any other server side language that allows you to include files). Basically, make your header, navigation, and footer separate pages and include them into each one of your pages using the php function include() (http://php.net/include) (or equivalent).

Hope this helps.

luckyros
10-15-2007, 03:58 AM
either use CSS, in-line styles or iFrames

search for any of these topics on this forum

Hi thanks for your reply.can you give me the code to be written in CSS for this ??

boogyman
10-15-2007, 12:33 PM
CSS cannot pull html code from a server. it only has the ability to style what is already present.

if you have access to PHP that would be your best option.


<?php include('/path/to/file.ext') ?>

djr33
10-15-2007, 06:18 PM
You could use a single CSS stylesheet to keep the same look for each pages, such as having the default text color as orange. It would not control content, though.

I agree with PHP. If you have the option, it's really easy and works well.

Think of include() as "take the contents of (....this....) and output them directly".

badshah501
10-16-2007, 11:08 AM
hey just copy the html page m make its copies on the same place. change the names of the copied files as the name of your links n make the editing in the pages as the name or the link name specified.
for more detailed information just click to {removed}

jc_gmk
10-16-2007, 11:57 AM
I wouldn't do the last suggestion because if you copy all your pages then finish updating all the content - what happens if you then want to change something (i.e. a link) on all pages?
You'd have to update all of the pages individually, not a good idea!

I agree PHP is the best option or if you use DreamWeaver you can set up templates so that if you make a change on the template it updates all of the other pages automatically. :)

djr33
10-16-2007, 06:17 PM
It's not only a bad idea, but also likely the exact thing the original poster is trying to avoid. Looks suspiciously like a spammer anyway.

molendijk
10-24-2007, 12:29 PM
Hello Luckyros,
You could use the technique explained here (http://www.dynamicdrive.com/forums/showthread.php?t=25009) (although it works with frames, it avoids certain disadvantages of frameset use).

Arie Molendijk.