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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
"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


In reply to Re: perl CGI: textfield and textarea width variability by ww
in thread perl CGI: textfield and textarea width variability by mtmcc

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-20 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found