The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Why isn't my footer at the bottom? Reply To: Why isn't my footer at the bottom?


Have you thought about PHP for your pages?

I am using dozens of pages that use the same format.

First off, you can take half the code you have, place that into a text file, have PHP, JS, or even HTML read that file.
If you are using the same header, you can change the title, the canonical, description, and other information. The problem is:

I have to use 2 pages for each to get the order right.

In the PHP page I set the variables.
Then I create a “content” page in html.
The content is specific for that page.
I also have an “includes” folder.

My includes is where I make the changes to ensure all my pages are the same.

These includes are : header.php, navigation.html, preferences.html, and footer.html…

Then I use variables in my header.php

All data that WILL NOT CHANGE are kept as-is; the info that needs changing are:

<title><?php echo $pageTitle;?></title>
<meta name="description"content="<?php echo $pageDescription;?>">
<meta name="keywords"content="<?php echo $pageKeywords;?>">
<link rel="canonical" href="<?php echo $canonical;?>">

In the page I am working on, I set as a PHP page and set those variables.

For example, I am writing up character sets; this page is “alt_codes.php”; which has this as the only content:

$pageTitle="Character Sets [Alt Codes]";
$pageDescription="Page to describe character sets, many refer to these as Alt Codes, and much more ";
$pageKeywords=" alt codes, character sets, ASCII, ANSI, Binary, memory size, file size"; 

It makes changing pages easier.

You should use a styles page, but then, in certain circumstances, you can reference those specific pages. As in, people use separate styling sheets for their @media inquiries. If <768, then use this page; between this and that, use this page, anything over, use this page. The same can be used for scripts.

In fact, your scripts can be put into a text file and use “file_get_contents” and it will pull the data from that file. It will make you page easier to manage.

You have a page that looks absolutely beautiful, there’s no reason your other pages shouldn’t look the same. Using reference pages, as in PHP, will allow you to create other pages faster. I cannot make heads or tails of your code because there is a lot of code that is not needed.

This is my opinion, we all have them. I like opinions because it is a collaboration of multiple experiences all in one place. That’s what I initially thought Stack Overflow was…I was wrong there and it cost me.