Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Problems with Tables

    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?

    The problem page-in-question, is located here for the moment.

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Quote Originally Posted by Alikhat
    Bear in mind, I'm a complete noob.(obviously) But, what am I doing wrong?
    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:

    http://htmldog.com
    http://www.w3schools.com

    As for a quick fix, look within your nested tables and add the bit in red:
    Code:
    <table width="100%" TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
    <TD valign="top">

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Indentation

    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:
    Code:
    ...
    <body>
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td height="231" style="background-image: url(BBGBanner.jpg);
    background-color: #08091D; background-repeat: no-repeat; border-bottom: 0px #000000 solid;" colspan="2">
    </td>
    </tr>
    </table>
    
    <table width="100%" TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
    <TD>
    <body bgcolor="#08091D" text="#ffffff" link="#40ffff" vlink="#ffffff" alink="#ffff00">
    <font face="verdana, arial"><font size="2">
    <left>
    <table border="0" width="155" cellpadding="0" cellspacing="0" valign="top" class="sidenav">
    <tr>
    <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>
    </TD>
    </TR>
    ...
    the td marked in red to:
    Code:
    <td valign="top">
    While you're at it: remove the blue body tag: it's not only pointless, it has no business there.

    Edit:
    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.
    Last edited by ronaldb66; 03-03-2005 at 02:22 PM.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, thank you, thank you, thank you!!! It worked! 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.

  • #6
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •