Basic CSS Tutorial
Creating A Template
Once you have a page looking exactly the way you want it, you'll want to create a template. If you added the extra boxes in Lesson 8, creating a template and/or server-side includes is simple. COPY the text in your HTML file into a new file and name it template-1.htm. The 1 means it's for the main directory.If you want the SSIs, cut everything BETWEEN
<div id="footer"> and </div> <!-- footer-->
paste it to a new file and save it in your includes folder. Do the same thing for your header. Leave the divs on the page.
BETWEEN your divs, add the calls for the SSIs
<div id="footer">
<!--#include virtual="include/footer.htm"-->
</div> <!-- footer-->
Delete everything BETWEEN <div id="content"> and </div> <!-- content -->.
Save the template again.
To create a template for any subdirectories, copy and paste your -1 template and add your ../ to any of the CALLED files.
<!--#include virtual="../include/footer.htm"-->
Never use your template without first copying it to a new file.
Server-side includes are a different tutorial that are located on the TXGenWeb site.
How it looks.
Raw code from the template.
Previous