Whenever you're doing things like this with CGI.pm HTML commands, you need know what you want your final HTML code should look like first. In this case, it's difficult to see out of context, but certainly things like having 'th' tags outside of a 'tr' at the top there will confuse a browser.
Try constructing your 'ideal' HTML layout manually, then comparing the results from your script.
Using tables for layout can often get messy, and I would always prefer a pure-CSS layout, but even just adding a CSS class to the table would mean that you could then experiment with layouts (.mytable td {text-align:left;} etc.) without changing your perl code.
From what it looks like you're trying to achieve though, I think defining a style for the checkbox group and then playing with *its* layout would serve you better - you could then use the inbuilt group labels and size/align them as you want, rather than have a bunch of code to print them separately.
Cheers
Ben
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.