Help - Search - Members - Calendar
Full Version: Css Web Design Help
Boostcruising.com > Computers and Technology > Tech Head Corner
Zmit
Gday guys,
just thought it'd check in with you guys.

my website has individual CSS files for each page, but i'm now realising how much of a pain that is.

basically, i want to use the one CSS file as the 'master' for all pages, then over CSS files for each page.
first of all, is this possible?

second of all....
how do i get a page to mirror the code/text on another page?

e.g. "recent events" in the side bar that is auto-updated on all pages after copying the changes on the home page?

any help would be great.

Tim
kit
yes yes you can..

Create a global css document and just include it at the top:

CODE
<link rel="stylesheet" type="text/css" href="mystyle.css" />
RetardedMonkey
Kit is right with the first one.
Second one, there's two options I can suggest.

1. Use Dreamweaver to have a template which updates all the HTML pages in a web site.

2. Use a PHP function called include()
NaRzY
Using an external CSS file is most definitely the way to go. This way you can use a "master" style throughout your whole site and all your changes will be made to all pages.
Using PHP is a very smart option. It is very functional, free and a has large community is behind it so if you need help, it is there. Here is how the PHP include() function would work:
1. You have a file called "news.php" within that file you have something like below:
CODE
09-09-09 <h2>Added new news item!</h2>
<br />blah blah rant rant....


2. Then where ever you would like to include that "news.php" snippet, you would paste:
CODE
<?php include("news.php"); ?>


This techinque works very good for navigations, news, footers and headers. If you need anymore help, please drop me a PM and I will help you were I can.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.