The easiest way to do this is not with CSS but by using the labels for the buttons. Reading the
CGI documentation you will find you can create a HASH which ties a label to the value for each button.
radio_group(-name=>'group_name',
-values=>['eenie','meenie','minie'],
-default=>'meenie',
-linebreak=>'true',
-labels=>\%labels,
-attributes=>\%attributes);
Supplying a ref to this hash allows the labels to be totally unrelated to the value and will allow you to achieve what you want.
Even more interesting from the layout perspective, is the ability to have the button array created within an HTML table, viz:
All modern browsers can take advantage of the optional parameters -row
+s, and -columns. These parameters cause radio_group() to return an HT
+ML3 compatible table containing the radio group formatted with the sp
+ecified number of rows and columns. You can provide just the -columns
+ parameter if you wish; radio_group will calculate the correct number
+ of rows for you.
jdtoronto
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.