Skip navigation
ecc_ldillon
Currently Being Moderated

Table cell widths

Jun 18, 2013 12:03 PM

Tags: #dreamweaver

How do I set a specific table cell width that does not automatically adjust when content is added?

 

For example, I have code with a table cell set to 175px wide, however when I try to split the cell below it, the cell ignores the 175px setting.

 
Replies
  • Currently Being Moderated
    Jun 18, 2013 12:12 PM   in reply to ecc_ldillon

    How do I set a specific table cell width that does not automatically adjust when content is added?

     

    What is the total width of your Table? 

    When you save/refresh your page, the table cells should snap back into position.  Use live view or preview in browser to test your layout.  Design view isn't 100% reliable.

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2013 12:36 PM   in reply to ecc_ldillon

    This is the VERY wrong way to work with tables. To make things behave, you need a new table for each row. Just put one table after another (each with the desired row configuration) on the page, and they'll stack up like Legos.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2013 5:54 PM   in reply to ecc_ldillon

    Have you tried to hard-wire the widths in the table itself like this:

     

     

    <table style="width: 795px; border: 2px; padding: 0;">

      <tr>

        <td style="width: 175px;" colspan="3">  </td>

        <td style="width: 215px;">  </td>

        <td style="width: 175px;">  </td>

        <td style="width: 215px;">  </td>

      </tr>

      <tr>

        <td colspan="3">  </td>

        <td>  </td>

        <td>  </td>

        <td>  </td>

      </tr>

      <tr>

        <td style="width: 133px;"> </td>

        <td style="width: 133px;"> </td>

        <td style="width: 133px;"> </td>

        <td style="width: 133px;"> </td>

        <td style="width: 133px;"> </td>

        <td style="width: 133px;"> </td>

      </tr>

    </table>

     

    You need to do the math so that total width of individual cells plus two borders does not exceed the width of the table.  Apart from that it should work though I haven't used tables for some time now. 

     

    Of course you could use header styles to streamline the process but I just did this quickly.

     

    I must update the RPIs and Consumer Prices Index on my site for my tax clients to refer to.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 19, 2013 7:21 AM   in reply to ecc_ldillon

    The problem isn't DW, HTML just doesn't work well that way.

     

    No matter how sophisticated our programs get, they always end up limited by what HTML can do.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 19, 2013 7:46 AM   in reply to Jon Fritz II

    Actually, it's HTML tables that don't work that way. You either learn how *they* want to work, or you perish in frustration and flames!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points