Reading between the lines, it seems likely that what you have is a bunch of elements, not rows and columns of data (in other words, not really a table). using a table to format a collection of boxes is a very HTML 3.2, 1998ish way of doing HTML (and it wasn't the suggested method even back then). It seems somebody noticed that on their monitor, with the browser window whatever size they happen to have it at the moment, using their preferred font size, 7 items can fit in a row. Adjusting layout to fit different screens, different text sizes, etc is precisely what a web browser is for! It very likely shouldn't be a table with some predefined number of rows at all. Rather, it should be a sequence of boxes. Let the browser do its job and decide how many boxes fit in each row, on a particular display.

To make each box the same width so they line up nicely you'd use some CSS like this:

.gallery{ display:block; } .thumbnail{ display:inline-block; border:1px solid black; float:left; height:200px; width:100px; margin-left: 1em; }

In reply to Re: Re-dimensioning an HTML table with Perl ? by raymorris
in thread Re-dimensioning an HTML table with Perl ? by TheDonald

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.