Warning: include(/home/.lurky/jenni/star-girl.org/skins/cookiecheck.php) [function.include]: failed to open stream: No such file or directory in /home/jenni/star-girl.org/pages/tutorials/csscgi/csstrick.php on line 1

Warning: include() [function.include]: Failed opening '/home/.lurky/jenni/star-girl.org/skins/cookiecheck.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/jenni/star-girl.org/pages/tutorials/csscgi/csstrick.php on line 1

Warning: include() [function.include]: Filename cannot be empty in /home/jenni/star-girl.org/pages/tutorials/csscgi/csstrick.php on line 2

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/jenni/star-girl.org/pages/tutorials/csscgi/csstrick.php on line 2
CSS Trick


This is useful if you have a lot of subpages! When you change the code in one document, all your pages change to match it! This means that your background and colours, fonts etc. will all be changed quickly to suit your layout. This doesn't work in some browsers; but if you can see the coloured links and scrollbars on my site then it should work for you.
Note: this tutorial requires you to have a fairly good knowledge of CSS. If you are having trouble with parts of the code, then try taking a look at my other CSS tutorials first :)

1. Create a blank document in Notepad or a similar program. If you're using a free host, this may not work, but just try creating a new page of your site instead of going into Notepad). Then paste the following code into it:



2. Change the parts in caps and the hex colours #s to suit your layout. The end part of the CSS code is for e-mail forms and buttons etc.
3. Is your background a colour? Then change background-image: url(IMAGE URL GOES HERE); to background-color:BACKGROUND COLOR;
4. Save as style.css and upload it into your FTP if you use it. If not, then just save.

5. Now in all of your subpages put:



6. In the part which says YOUR STYLE URL, put your style.css url, which will be http://your-site.com/style.css
7. When you paste that code into your subpages, remember to take out any existing CSS code you have or it might not work.
8. Now whenever you change your layout, change the colours and background to match your layout in the style.css page, and all your subpages will change!

Remember to insert the code from step 5 in any new subpages you create :)
Warning: include() [function.include]: Filename cannot be empty in /home/jenni/star-girl.org/pages/tutorials/csscgi/csstrick.php on line 79

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/jenni/star-girl.org/pages/tutorials/csscgi/csstrick.php on line 79