Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: perl CGI: textfield and textarea width variability

by ww (Bishop)
on Jan 23, 2014 at 13:14 UTC ( #1071740=note: print w/ replies, xml ) Need Help??


in reply to perl CGI: textfield and textarea width variability

"I would like the widths of the textarea and textfield to be the same on each browser.

1) Why? Who cares? Users tend to use only a single browser at any given moment and if the rendering does what you need it to do for them (not necessarily for your taste) you're 'good to go.'

2) In any case, if you're trying to provide for identical rendering across a variety of monitor sizes and resolutions, your intent is probably impractical, at the very least. Even today -- different browsers tend to produce variant results from identical html

3) So, you have an exceedingly difficult challenge, for the reasons in 2. But as long as you're merely concerned with making the fields -- as rendered case-by-case by a single browser for a single reader -- similar, you can try this (or, Update: tangent's or marto's approach, above).

One possible approach (while still using CGI.pm), however, may be to specify a <body style="width: nn; max-width: nn;"> (where nn is in pixels) and to (manually) use css style to set percentage-valued widths for the individual textfields and textareas.

(<style="overflow: scroll;"> may also help.)


Come, let us reason together: Spirit of the Monastery

Quis custodiet ipsos custodes. Juvenal, Satires


Comment on Re: perl CGI: textfield and textarea width variability
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071740]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2014-09-17 19:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (95 votes), past polls