Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: perl CGI: textfield and textarea width variability

by ww (Archbishop)
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, 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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071740]
[marto]: thanks
[Corion]: marto: Maybe it opens offscreen? I wouldn't know an easy way to confirm that, except maybe closing the chromeless window and then looking whether iexplore.exe is still running

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2018-03-21 11:57 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.