spannclann has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to format the radio and submit buttons in the start_form. I would like to have them centered on the page, but I cannot find any information on how to accomplish this. Everything I have tried has failed. My code follows:
#!/usr/bin/perl -w use CGI; use CGI ":standard"; $time = localtime; $servertime = `uptime`; print header, start_html(-title=>"SysInfo", -background=>"tower.jpg", -text=>"black"), h1({-align=>center}, "Franklin University's System Information", b), start_form, radio_group( -name=>'base', -values=>['Up Time','Server Time'], -default=>'Up Time'), p, submit, end_form, hr; print CGI::center(); $base = param("base"); if ($base eq "Up Time") { printf($servertime); } else { printf($time); } print hr; print CGI::center(); $log = "count.dat"; open GETCOUNT, "<$log" or die("Error in $0: $log - $!n"); $hits = <GETCOUNT>; close(GETCOUNT); $hits++; printf "This web page has been viewed $hits times."; open COUNT, ">$log" or dienice("Cant open file to WRITE"); print COUNT $hits; close COUNT; print hr; use strict; print start_html("Browser Detect"); my($ua) = $ENV{HTTP_USER_AGENT}; if (index($ua, "MSIE") > -1) { print "The Franklin Server has determined that you are using Intern +et Explorer to access it.<p>\n"; } elsif (index($ua, "Netscape") > -1) { print "The Franklin Server has determined that you are using Netsca +pe to access it.<p>\n"; } elsif (index($ua, "Safari") > -1) { print "The Franklin Server has determined that you are using Safari + to access it.<p>\n"; } elsif (index($ua, "Opera") > -1) { print "The Franklin Server has determined that you are using Opera +to access it.<p>\n"; } elsif (index($ua, "Mozilla") > -1) { print "The Franklin Server has determined that you are probably usi +ng Mozilla to access it.<p>\n"; } else { print "The Franklin Server cannot tell what browser you are using!< +p>\n"; } print end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Centering start_form data
by InfiniteSilence (Curate) on Apr 09, 2014 at 20:42 UTC | |
|
Re: Centering start_form data
by davido (Cardinal) on Apr 09, 2014 at 20:43 UTC | |
|
Re: Centering start_form data
by Anonymous Monk on Apr 09, 2014 at 23:28 UTC |