View Full Version : question


one1one
12-24-2005, 03:25 AM
Is it possible to use CSS to make one nav bar for all pages and if you want to change information on the nav you just chage one file, because ever since i stopped using and frames and used css i always have to change every page if i just add or remove a link to the nav, thanks in advance.

Monkey Bizzle
12-24-2005, 03:42 AM
There is a way, but it's not using CSS. CSS is just the styles of a page. You can use PHP includes to do what you want.

http://lissaexplains.com/html6.shtml#php

one1one
12-26-2005, 03:41 AM
Can someone please give me a link to a site where includes are used so I look at it as an example because I don't really understand it.

pb&j
12-26-2005, 04:38 AM
it would be impossible to see it plain like you want, because PHP is a serverside language and it would be translated to normal html coding before your browser sees the webpage.

SSI has the same inserting capabilities too.

perhaps do a google or forum search for those items to see other threads on the subject. reading those over may clear it up a bit for ya.

maztrin
12-26-2005, 11:43 AM
you can see what a php inlcude looks like if you go here:

http://www.htmlite.com/php039.php

one1one
12-26-2005, 01:13 PM
Does let say sidebar.php have to be written in php and can it be placed on a stylesheet on the left. Meaning the menu goes down on the left.

pb&j
12-26-2005, 04:36 PM
the main page should have the php extension on it, because it will have php coding on it. it will have the "include" codes in it. the included coding pages dont need the php extension, but it doesnt hurt either.

the easy way to remember how includes work...

step 1.
make your webpage just normal and complete.

step 2.
take the piece of coding that you want as a seperate piece, put it on its own page, in its place put in the include coding.

Monkey Bizzle
12-26-2005, 06:48 PM
Does let say sidebar.php have to be written in php and can it be placed on a stylesheet on the left.

Remember, stylesheets and PHP have nothing to do with each other ;)

one1one
12-27-2005, 05:26 AM
the main page should have the php extension on it, because it will have php coding on it. it will have the "include" codes in it. the included coding pages dont need the php extension, but it doesnt hurt either.

the easy way to remember how includes work...

step 1.
make your webpage just normal and complete.

step 2.
take the piece of coding that you want as a seperate piece, put it on its own page, in its place put in the include coding.
Sorry if I'm a little noob but if I do that will everything align it self?

pb&j
12-27-2005, 07:46 AM
refer to step 1.
before you do any includes what so ever... just make the full webpage by itself as a whole. fully complete. aligned the way you want it. once that is done to your liking, then... you can start creating includes.

one1one
12-27-2005, 10:27 AM
Since I want to make the sidebar as an include, you mean i should build the wholse site without the side there yet right?

pb&j
12-27-2005, 04:55 PM
build up your whole page WITH your sidebar and everything in it already. make your webpage a full webpage. when you view this one webpage, you should see everything you want in all the right places. pretend you are not going to use includes at all yet.

when the page looks like how you want it, then you can start making "includes" out of it.

one1one
12-28-2005, 12:51 AM
Thanks I finally get it! :)