in reply to Spacing out the radio button in CGI.pm

Sometimes the simple way is the best.  (Actually, usually the simple way is the best!)

Try something like this:

-values => [ ' Light ', ' Medium ', ' Full ' ],

and play around with the spacing until it looks just right!

If you need to create multiple spaces, you may of course have to use the "non-breaking space" directive " " ...

-values => [ 'Light  ', 'Medium  ', 'Full&nbsp +; ' ],

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: Spacing out the radio button in CGI.pm
by Anonymous Monk on Jun 05, 2006 at 11:37 UTC
    But adding space to the value changes the value. I'd use CGI's support for CSS to insert some padding to those elements.

      Then let's do this instead.

      radio_group(-name => "analysis", -multiple => 1, -values => [ "Light", + "Medium", "Full" ], -labels => {"Light", " Light ", "Medium", " Medi +um ", "Full", " Full "})
      That's a perfectly good solution as well!  It's just that it's more complicated (ie. takes more work, takes more code, etc.), so it's not quite as quick a fix.  But if keeping the value unchanged is important, then by all means go with CSS.

      s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/