PDA

View Full Version : Is This Considered CSS?



zapazon
18 Jan 2008, 06:49 PM
Hi,

What I'd like to do is create a website, and just like every other website, have the same logo, and links at the top - just like at this forum. No matter where you go, you'll see the webdevforums logo, and all the links below it. Can I implement CSS for this? I want to be able to make new pages, and immediately be able to do a few click and have everything already there where I want it. I'm a little confused as how exactly to do this. Can someone refer me to an article on this exact issue, or explain to me in steps how I go about doing this using dreamweaver cs3. Thank you!

Alan
18 Jan 2008, 07:58 PM
I think you're a little confused as to what CSS is used for. CSS is used for styling and laying out the page. What I think you are referring to is "includes". This website uses the PHP (PHP Hypertext Preprocesser) scripting language. All the background workings of this website are carried out before anyone sees anything by the server (including the header file which would house the logo for example). For example...

If I have two files, "header.php" and "index.php".


// header.php file
<html>
<head>
<title>My Website</title>
</head>


// index.php file
<?php include("header.php"); ?>
<body>
My content
</body>
</html>

When the index.php file is viewed by the browser it, and you view the source code. It will appear like this:


// index.php (Browser Source Code)
<html>
<head>
<title>My Website</title>
</head>
<body>
My content
</body>
</html>

I hope that clears things up abit.

Again, this is only one of the functions in PHP's vast library. Send me a PM if you have any questions. I hope I helped a bit. If you Google "PHP include tutorial" you should come up with something useful. =)