http://www.perlmonks.org?node_id=137667


in reply to Re^3: Just plain dumb
in thread Loop counter only works for 2

Actually it won't it'll only use up to the space that the block in the TD is filled up to and no more.

Replies are listed 'Best First'.
Re^5: Just plain dumb
by Aristotle (Chancellor) on Jan 10, 2002 at 08:35 UTC
    Hmm yes - depends on the browser too.. IE will usually DWYM (which is not always good, as it sometimes fails, and often promotes laziness), while NN is very stubborn about doing exactly what you said (mostly making things too large), whereas Opera is very stubborn about doing what it wants (and ends up making things too small). What may work is if you have a single row at the top, with a single cell, set to 100%, containg a single-pixel transparent GIF. The other solution may be to try doing what you want using CSS (which is often a godsend).
      Yes most definately depends on the browsers, even when the HTML is 'correct/valid' and is more complex than just a couple of rows in a table the results that show up in the browsers can be as differnt as if you were feeding /dev/urandom to it rather than just normal HTML. The way I currently have it seems to work quite well with opera, IE and even links, but looks so very, very bad in netscape 4.X. I think I'll experiment with your idea though, doesn't hurt to try and have it working with most browsers under the sun.
        I should have done this at the start:
        my $row_width = int 100 / $options_config{'news_rows'};
        and used that for the width attribute in TD