Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

how can I "lock" html table cells?

Please help.

Thank you.

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    If you mean: making them a fixed size:

    Declare Strict DocType (XHTML1.x or HTML 4.01)

    Use CSS to set the table layout to fixed:

    table {

    table-layout: fixed;

    }

    Declare width and height for cells in CSS, as well:

    th, td {

    width: [width] [px or %];

    height: [height] [px or %];

    }

    Finally, declare overflow, white-space and text-overflow:

    th, td {

    overflow: hidden;

    white-space: no-wrap;

    text-overflow: ellipsis; /*May be IE proprietary - should work universally */

    }

    All this is only really effective if the table is used for what it's intended for: tabular data, not layout.

  • 1 decade ago

    <table style="td-width:#">

    or whatever the CSS attribute for cell size is supposed to be.

Still have questions? Get your answers by asking now.