View Full Version : Problems with Tables

03-03-2005, 08:33 AM
I have been trying to set up a page with a banner at the top, a menu running down the left side and an area of text in the main body of the page. Sounds simple, doesn't it? Except that no matter what I do, either the menu on the left insists on creeping halfway down the page, instead of sitting up snuggly near the top or the text in the middle wanders all the way down under the menu. Bear in mind, I'm a complete noob.(obviously) But, what am I doing wrong? :confused:

The problem page-in-question, is located here (http://heartless-hook.com/BBG_Test/bbgindex.html) for the moment.

03-03-2005, 09:32 AM
Bear in mind, I'm a complete noob.(obviously) But, what am I doing wrong? :confused:

Many, many things. Many things. Non-existant tags, deprecated tags, no doctype, nested table layout, etc. But it's okay, because you're new, which means there is no better time to learn how to do this the right way. Try some of these tutorials which will help guide you in a much more modern, standards-based, fashion:


As for a quick fix, look within your nested tables and add the bit in red:

<table width="100%" TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TD valign="top">

03-03-2005, 02:30 PM
Thanks, but I don't think that "quick fix" is going to help, as I already have that tag attached to all my nested tables. The only place it isn't located, is the larger table encompassing the left menu and center. So, I'm still not sure what to do to fix this.

03-03-2005, 03:19 PM
Since it's very hard to determine your page's structure, I'd strongly recommend using indentation to visualize which elements are nested in which.
By the looks of it, both your menu and your main content sit in a cell of their own in a two cell table. You can check this visually by setting the border of that table to "1" (yes, critics, I would normally advice CSS, but who cares).

If I judge the structure right, you need to change in this code section:

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<td height="231" style="background-image: url(BBGBanner.jpg);
background-color: #08091D; background-repeat: no-repeat; border-bottom: 0px #000000 solid;" colspan="2">

<table width="100%" TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<body bgcolor="#08091D" text="#ffffff" link="#40ffff" vlink="#ffffff" alink="#ffff00">
<font face="verdana, arial"><font size="2">
<table border="0" width="155" cellpadding="0" cellspacing="0" valign="top" class="sidenav">
<td align="left">
<a href ="frontpage.html" target ="showframe" onMouseOver="hiLite('img01','HomeButtonDep')"
onMouseOut="hiLite('img01','HomeButton')"><img src="HomeButton.gif" width="129" height="36" border="0" name="img01" ALT="BBG Home Page"></a>
... the td marked in red to:

<td valign="top">
While you're at it: remove the blue body tag: it's not only pointless, it has no business there.

Richard: I realise it's exactly the same thing you mentioned, but I thought I'd add some extra markup around it to make sure the correct td gets changed.

03-03-2005, 08:29 PM
Oh, thank you, thank you, thank you!!! It worked! :thumbsup: That is, the valign="top" in the proper place did. I did have to keep the blue body tag right where it was, however, as when I removed it, my background color disappeared and all my links turned the wrong shade.

03-03-2005, 09:24 PM
Well, I think Ronald meant for you to put the information that's in that second body tag in the first body tag. There is only supposed to be one body tag in a document, and all the markup goes inside of it. So a second body tag is bad, bad news.

@Ronald: I actually purposefully left out which td to change... my effort at "teaching a man to fish." Go figure, it never works :D