Tech Off Thread

6 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Table columns move

Back to Forum: Tech Off
  • User profile image
    brussell

    I am having a problem with my site.
    It is writtin in ASP.NET.

    I have a table that has three rows.
    The top row is for a header, the bottom for a footer.
    Those each have one column.

    The middle row has two columns.
    The left one is for a menubar.
    It is supposed to be set to a width of 170 pixels and not move.
    The right one is the content for that page.

    In Visual Studio, everything looks great.
    In IE, on some pages, the left column expands based on the width of the browser.
    The main page had looked fine in IE until I removed the last line of text (no tags, just text) from the right column of the middle row.
    I put it back and the page was fine again.
    I viewed source on both versions (with and without the line) and the only difference in code was the line...

    I don't get what is going on. I don't want that cell to expand.

    Can anyone please help?

    Edit: and before anyone says it's a problem with IE, it happens in Firefox too.

  • User profile image
    Harlequin

    Give the right one a style of width:auto;, see if that does anything...

    If not, then do width:90%; to force the right TD to spead to it's fullest....

  • User profile image
    brussell

    Well, that looks better, thanks.

    The problem with that is it puts the right column right against the menubar in the left column.

    But I can use CellPadding to put a little space back in.


  • User profile image
    W3bbo

    brussell wrote:
    I am having a problem with my site.
    It is writtin in ASP.NET.

    I have a table that has three rows.
    The top row is for a header, the bottom for a footer.
    Those each have one column.

    The middle row has two columns.
    The left one is for a menubar.
    It is supposed to be set to a width of 170 pixels and not move.
    The right one is the content for that page.


    BURN THE HERETIC!

  • User profile image
    brussell

    W3bbo wrote:
    brussell wrote:I am having a problem with my site.
    It is writtin in ASP.NET.

    I have a table that has three rows.
    The top row is for a header, the bottom for a footer.
    Those each have one column.

    The middle row has two columns.
    The left one is for a menubar.
    It is supposed to be set to a width of 170 pixels and not move.
    The right one is the content for that page.


    BURN THE HERETIC!


    Saw that coming. Smiley

  • User profile image
    Maurits

    Make the header and footer <div>s.
    Make the navbar/content area a single table with one row and two columns:

    <div>
        <!-- header goes here -->
    </div>
    <table>
        <tr>
            <td>
                 <!-- navbar here -->
            </td>
            <td>
                 <!-- content here -->
            </td>
        </tr>
    </table>
    <div>
        <!-- footer goes here -->
    </div>

    Or if you're feeling particularly CSS-y, you can experiment with things like float: left; for the navbar.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.