You are here: Home > Useful Guides > Step 3) Creating The Files - Part 2
Wednesday, 03 September 2008
CSS is a wonderful thing, especially combined with templates. By changing the contents of one file, you can roll out changes site-wide (template files and CSS).
This site will make use a CSS template so at this stage, I'm going to set up a very basic style.css file.
The template page will be split into four areas:
A wrapper will encase all the layout <div>'s. This means we can control the page width by changing just one setting.
A header <div> is where I will keep the main navigation and logo.
A content <div> is where I'll keep the outputted text.
A footer <div> will be used to contain copyright information and those horrid (but necessary) links such as terms, privacy and disclaimer.
I'll give each of these a div "id" - there are div "classes" and "id's", an id should be allocated once on a page whereas classes can be used multiple times.
Other basic information required is formatting for the following tags:
body {background: #FFF; color:#000; font-size:12px; font-family: 'TrebuchetOkay, now for the basic template.
MS', Arial, Verdana, sans-serif; margin:20px 0px; padding:0px 0px 10px 0px; }
a {color:#CC0000; background:transparent; font-weight:normal; text-decoration:underline}
a:hover {color:#000099; background:transparent; font-weight:normal; text-decoration:none}
h1 {font-size:20px; letter-spacing: -1px; }
h2 {font-size:18px; font-weight: normal; }
h3 {font-size:14px; font-weight: bold; }
h4 {font-size:12px; font-weight: bold; }
img {border: 0px; }
#wrapper {width:780px; margin:0px auto; padding: 0px; }
#head {}
#content {}
#foot {padding: 5px; text-align: center; color:#C0C0C0; font-size:10px;}
#foot a {color:#C0C0C0; font-weight: normal;}
echo "<div id='head'></div>";with:
echo "<div id='head'><a href='/' title='My Recipe Site'>My Recipe Site</a></div>";I haven't wrapped it with a H1 tag as this should be saved for the page description, rather than the site title.

Bookmark this article in Bumpzee, Del.icio.us, Digg and Stumble Upon
Technorati tags: css, template, website, design
You may also be interested in reading:
Care to Comment?Comments are manually approved and hence can a while to appear. Questions, informative posts, and feedback comments are gladly accepted. Spam is deleted. Spam-type comments have their links removed (Comment Policy)
Please allow 1 minute to connect. Please quote code DF
2008:
2007:
Freebies make me work harder! If you send it, I'll blog about it - unless it's rude :-)
