Back at work on Beernink.com again!! Over the last week or so, I've added a book review section and a couple of
articles. In particular, I've made a major pass over almost everything, cleaning things up and
making them consistent throughout the site.
Below I mentioned that I might revert to my old table-based design rather than using pure CSS. I have done that.
My headers are all table-based, because it is simple, and works everywhere. But the content of my pages is purely
CSS (at least on the pages I have converted).
I arrived at a simple style for using CSS, which I believe will work everywhere. I have separate style-sheets,
for modularity, but I use PHP to load them. Like this:
<style>
<?php include 'style/std.css'; ?>
<?php include 'style/blog.css'; ?>
</style>
Now, for each section of the site, I load the main styles from std.css, then I load the section-specific
styles from a separate file, xxx.css. All browsers see this as a single inline style record, yet it allows
me to modularize and share styles.
And since the articles are split out, the content of a simple page might look like this:
<?php include 'inc/header.htm'; ?>
<?php include 'inc/joke.htm'; ?>
<?php include 'inc/emptynav.htm'; ?>
<?php include 'reviews/pages/farmer.htm'; ?>
<?php include 'inc/footer.htm'; ?>
Without using any PHP other than the include statement, you can make your site a lot cleaner! Note that these
includes all depend on the include trick I described in the article below.