J
Justin C
I've spent many years just bodging my html with the CGI module. But now
I'm trying to do it properly and I'm happy with my progress so far. What
I am having trouble with is specifying cell widths (and therefore the
width of the entire column).
I'm creating tables like this:
print table({-border=>1},
Tr({-align=>'left', -valign=>'top'},
[
td([ "foo", "bar", "baz" ]),
td([ "eenie", "meenie", "minee" ]),
td({-colspan=>'3',-align=>'center'},[
submit('Upload') . " or " . reset('Clear')
])
]
)
);
I used to set my widths with <td width="20%"> (or whatever value), but
I see that that method is now deprecated, and that we should use styles.
If that is the case, how does one, using the above table creation
method, add styles per table cell, because, from the above it appears
that cell attributes can be set only for the entire row by putting,
after "td(", {-attribute=>'setting', -other_attr=>'setting'}.
Thank you for any help you can give with this.
Justin.
I'm trying to do it properly and I'm happy with my progress so far. What
I am having trouble with is specifying cell widths (and therefore the
width of the entire column).
I'm creating tables like this:
print table({-border=>1},
Tr({-align=>'left', -valign=>'top'},
[
td([ "foo", "bar", "baz" ]),
td([ "eenie", "meenie", "minee" ]),
td({-colspan=>'3',-align=>'center'},[
submit('Upload') . " or " . reset('Clear')
])
]
)
);
I used to set my widths with <td width="20%"> (or whatever value), but
I see that that method is now deprecated, and that we should use styles.
If that is the case, how does one, using the above table creation
method, add styles per table cell, because, from the above it appears
that cell attributes can be set only for the entire row by putting,
after "td(", {-attribute=>'setting', -other_attr=>'setting'}.
Thank you for any help you can give with this.
Justin.