Header - Content - Footer - in XHTML?

E

Ed Jensen

I have a fairly basic web site with a fairly typical header, content,
footer layout. I've done it so that the footer attaches itself to the
bottom of the web page. Here's the HTML code:

<html>
<body>
<table height="100%" width="100%">
<tr height="1" valign="top" width="100%"><td>My header goes here</td></tr>
<tr valign="top" width="100%"><td>My context goes here</td></tr>
<tr height="1" valign="bottom" width="100%"><td>My footer goes here</td></tr>
</table>
</body>
</html>

I end up with something like this (fixed width font suggested):

+----------------------+
| My header goes here |
| |
| My content goes here |
| |
| |
| |
| |
| |
| My footer goes here |
+----------------------+

I really like this because the footer always goes to the bottom of the
web browser.

Recently I decided to move to XHTML by adding the appropriate DOCTYPE
and other things necessary as recommended by w3c.org. As soon as I
did that, my header, content, footer trick stopped working. Now it
renders like this:

+----------------------+
| My header goes here |
| |
| My content goes here |
| |
| My footer goes here |
| |
| |
| |
| |
+----------------------+

The footer no longer attaches itself to the bottom! I've tried quite
a few tweaks, but haven't had any success.

Can anyone help me with this?

Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top