• Tables have beaten me up!

    Author
    Topic
    #392753

    Try:

    That should set the table width to exactly 550 pixels

    Viewing 3 reply threads
    Author
    Replies
    • #707098

      Dear Bryan,
      I started with these lines, with the width set to 550, but after refreshing, the code changes to this, and the 4th row of code is added automatically, and the table flies out to the right, to 794 pixels wide.

      It’s the HTML gods punishing me for some unknown prior sin.

      I have reduced some images to fit and I wonder if the table is reading the original sizes somehow.
      Steve

      • #707116

        Try moving the colspan line into the TD tag instead of the TR tag.

      • #707117

        Try moving the colspan line into the TD tag instead of the TR tag.

      • #707367

        HTML tables are not very smart. They like everything to be the same = number of columns per row, rows per column, column widths and row heights (cell heights really). So if you’re doing anything fancy for the layout, it helps to keep borders on until you’re finished. You’ll have an easier time seeing what happening.

        Do all the rows of your table have the same number of columns once you take into account the number of

        elements and the colspan attributes?

        Do you have images in table cells? These will override width attributes at the table or cell level (tables can’t crop images).

        Do you have long unbroken text, or nowrap attributes in some cells?

        Do you have cells that span different columns in the table (e.g., row 1 col 2-4, row 2 col 1-2, row 3 col 3-5)? When you use colspan in cells, the width of the combined columns is determined by the content in other rows.

        Sometimes it’s easier to stack several tables rather than try to adjust cells within rows of a single table.

        Hope some of that helps.

        • #707698

          Dear Charlie,
          I understand everything but the following:
          “When you use colspan in cells, the width of the combined columns is determined by the content in other rows.”
          All the other questions you’ve posed have been noted and don’t seem to pose a problem.

          Where can I find an in depth discussion of tables? The two texts I have gloss over tables as if they were easy as pie.

          Best,
          Steve

          • #709370

            If you find a good book on tables, let us know. I think part of the problem is that the tags are pretty simple – predicting how a browser will interpret them is not. I find myself using http://www.webreference.com[/url%5D when I need to know something. If you’ve got the basics but find yourself stopped by problems, check here in the lounge (of course), or use Google – and be sure to search both Web and Groups, the later of which is the old dejanews archive search of the newsgroups.

            HTH

            • #717960

              Thanks to all who suffered through My Tables Problem. I used all your suggestions, and finally it fit into the width, and I left it alone.

            • #717961

              Thanks to all who suffered through My Tables Problem. I used all your suggestions, and finally it fit into the width, and I left it alone.

          • #709371

            If you find a good book on tables, let us know. I think part of the problem is that the tags are pretty simple – predicting how a browser will interpret them is not. I find myself using http://www.webreference.com[/url%5D when I need to know something. If you’ve got the basics but find yourself stopped by problems, check here in the lounge (of course), or use Google – and be sure to search both Web and Groups, the later of which is the old dejanews archive search of the newsgroups.

            HTH

        • #707699

          Dear Charlie,
          I understand everything but the following:
          “When you use colspan in cells, the width of the combined columns is determined by the content in other rows.”
          All the other questions you’ve posed have been noted and don’t seem to pose a problem.

          Where can I find an in depth discussion of tables? The two texts I have gloss over tables as if they were easy as pie.

          Best,
          Steve

      • #707368

        HTML tables are not very smart. They like everything to be the same = number of columns per row, rows per column, column widths and row heights (cell heights really). So if you’re doing anything fancy for the layout, it helps to keep borders on until you’re finished. You’ll have an easier time seeing what happening.

        Do all the rows of your table have the same number of columns once you take into account the number of

        elements and the colspan attributes?

        Do you have images in table cells? These will override width attributes at the table or cell level (tables can’t crop images).

        Do you have long unbroken text, or nowrap attributes in some cells?

        Do you have cells that span different columns in the table (e.g., row 1 col 2-4, row 2 col 1-2, row 3 col 3-5)? When you use colspan in cells, the width of the combined columns is determined by the content in other rows.

        Sometimes it’s easier to stack several tables rather than try to adjust cells within rows of a single table.

        Hope some of that helps.

      • #707658

        I just reread your original post and just realised that you are using Ultradev.

        Dreamweaver/Ultradev seem to add extra columns if the columns are not the same width the same all down the table. You may have to live with that and change some of your colspan to match how may “new” columns they actually span. This is one of the few things about Dreamweaver I’m not overly fond of.

        It’s been a while since I have layed out complex tables in Dreamweaver, but I think I think I eventually resorted to changing the table code by hand (in code view and not layout view).

      • #707659

        I just reread your original post and just realised that you are using Ultradev.

        Dreamweaver/Ultradev seem to add extra columns if the columns are not the same width the same all down the table. You may have to live with that and change some of your colspan to match how may “new” columns they actually span. This is one of the few things about Dreamweaver I’m not overly fond of.

        It’s been a while since I have layed out complex tables in Dreamweaver, but I think I think I eventually resorted to changing the table code by hand (in code view and not layout view).

    • #707099

      Dear Bryan,
      I started with these lines, with the width set to 550, but after refreshing, the code changes to this, and the 4th row of code is added automatically, and the table flies out to the right, to 794 pixels wide.

      It’s the HTML gods punishing me for some unknown prior sin.

      I have reduced some images to fit and I wonder if the table is reading the original sizes somehow.
      Steve

    • #707025

      I’m a pure novice. But determined. I am using UltraDev (Dreamweaver) to construct, but usually hand code the HTML to fine tune. I am missing something though.

      I have constructed an HTML document for my microscopes-for-collectors site that consists of 15 or so rows, 2 columns wide.
      I can’ t control the width of these rows. Some rows have text, others have another table inside, with 4 columns, some have images only. And quite a few have the specified two columns.

      I have used a colspan=”2″ in row definitions (tr) where there is only text or an image, or another table. Before I used the colspan in the (td) definition, but it seemed to work not at all. Each row seems to have a mind of its own, and flies off to the right. Where I specify width=”550″ at the top, or width=”100%” or exact pixels in the body of the table, it seems to have little effect. The table usually usually flies out to about 750 pixels. When I move the row back to 550 pixels it leaves several empty

      data areas to the right.

      Is there a way to absolutely lock this master table at 550 pixels?

      Thanks for any suggestions.

      Steve

      • #707685

        Dear Brian,
        I tried to set the initial column width specification to 550 but UltraDev just resets it at will. I did find all the extra columns added, and the colspans were reset to the new number of columns. I was working in layout view.

        I got rid of them by doing a find and replace for the extra

        that were added. But that left me to manually remove some extra “td” specifications that were dropped in and also manually reset the colspan to 2 again. When I try to move the right hand border manually towards 550 width, I get the extra columns. I switched out of layout view and was able to drag the table to the left more easily. I am at 600 pixels and can’t seem to progress further. I will probably leave it there and just have it 10% wider than I wanted. I believe that now is the time to take it out of UltraDev and set it up by hand. Perhaps I will get it squeezed down further.

        The same “addition” of extra data cells also occurs when I try to change the height to get rid of the white spaces. In the layout view this appears as a faint grey area, and I just find it manually and delete the extra row.

        I will let you and the other correspondents know how I do.

        Thanks to everyone. I tried each of your suggestions. Every suggestion helped, and let me understand the software and HTML more and more.

        Steve

      • #707686

        Dear Brian,
        I tried to set the initial column width specification to 550 but UltraDev just resets it at will. I did find all the extra columns added, and the colspans were reset to the new number of columns. I was working in layout view.

        I got rid of them by doing a find and replace for the extra

        that were added. But that left me to manually remove some extra “td” specifications that were dropped in and also manually reset the colspan to 2 again. When I try to move the right hand border manually towards 550 width, I get the extra columns. I switched out of layout view and was able to drag the table to the left more easily. I am at 600 pixels and can’t seem to progress further. I will probably leave it there and just have it 10% wider than I wanted. I believe that now is the time to take it out of UltraDev and set it up by hand. Perhaps I will get it squeezed down further.

        The same “addition” of extra data cells also occurs when I try to change the height to get rid of the white spaces. In the layout view this appears as a faint grey area, and I just find it manually and delete the extra row.

        I will let you and the other correspondents know how I do.

        Thanks to everyone. I tried each of your suggestions. Every suggestion helped, and let me understand the software and HTML more and more.

        Steve

    • #707026

      I’m a pure novice. But determined. I am using UltraDev (Dreamweaver) to construct, but usually hand code the HTML to fine tune. I am missing something though.

      I have constructed an HTML document for my microscopes-for-collectors site that consists of 15 or so rows, 2 columns wide.
      I can’ t control the width of these rows. Some rows have text, others have another table inside, with 4 columns, some have images only. And quite a few have the specified two columns.

      I have used a colspan=”2″ in row definitions (tr) where there is only text or an image, or another table. Before I used the colspan in the (td) definition, but it seemed to work not at all. Each row seems to have a mind of its own, and flies off to the right. Where I specify width=”550″ at the top, or width=”100%” or exact pixels in the body of the table, it seems to have little effect. The table usually usually flies out to about 750 pixels. When I move the row back to 550 pixels it leaves several empty

      data areas to the right.

      Is there a way to absolutely lock this master table at 550 pixels?

      Thanks for any suggestions.

      Steve

    Viewing 3 reply threads
    Reply To: Tables have beaten me up!

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: