I've always set form element sizes by using size on textfields and
rows and cols on textareas.
That's always lead to inconsistencies and a bit of guesswork when you
want a form element to fill a fixed width and you want textfields to be
as wide as textareas.
Now, we can use a bit of CSS to set the width and for textareas also
the height.
Is that a good idea, and if so should I still set size, cols and rows?
Is this widely supported?
It seems like every few years I have to unlearn something.
Jeff 9 2032
Scripsit Jeff:
I've always set form element sizes by using size on textfields and
rows and cols on textareas.
Fine. Just make sure you enlargen them to be sufficient. That's more
than they currently are, probably. Too many textareas are stamp-size.
Too few fields for surname input do not allow Mrs.
Hämäläinen-Virrankoski to enter her name visibly.
That's always lead to inconsistencies and a bit of guesswork when
you want a form element to fill a fixed width and you want textfields
to be as wide as textareas.
Then stop wanting such things.
The widths are for convenient input, not for the author's esthetic eye.
Now, we can use a bit of CSS to set the width and for textareas also
the height.
That doesn't mean we should.
Is that a good idea, and if so should I still set size, cols and
rows?
Consider the CSS Caveats: http://www.cs.tut.fi/~jkorpela/css-caveats.html
Besides, the cols and rows attributes are required in a textarea element
by HTML syntax. And you should always set the size attribute for a
single-line text input field, since its default value is unspecified.
It seems like every few years I have to unlearn something.
Indeed. But that's a different story.
--
Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
On 2008-02-09, Jukka K. Korpela <jk******@cs.tut.fiwrote:
[...]
Consider the CSS Caveats: http://www.cs.tut.fi/~jkorpela/css-caveats.html
One thing you say there is "CSS Support varies [...] For form fields,
many CSS properties are often ignored by browsers".
It's not really lack of "support" for anything. Any CSS styling you can
do on form fields at all is a bonus. As far as the CSS 2.1 specification
is concerned, buttons, textareas, etc., are replaced elements. You
shouldn't expect to be able to style them with CSS properties at all,
although most browsers do let you set a few things.
Jukka K. Korpela wrote:
Scripsit Jeff:
> I've always set form element sizes by using size on textfields and rows and cols on textareas.
Fine. Just make sure you enlargen them to be sufficient. That's more
than they currently are, probably. Too many textareas are stamp-size.
Too few fields for surname input do not allow Mrs.
Hämäläinen-Virrankoski to enter her name visibly.
Oddly, my default text field is 30, which is more than that. And I
usually make textareas 55 x 4 sometimes with an auto lengthen.
The trouble is that you usually want textareas to take up the max
width and generally you have to downsize them to due to width
requirements on some browser. That's why I thought style="width: 100%"
would be nice. I'll have to read the caveats later to see why that isn't
so.
Jeff
>
> That's always lead to inconsistencies and a bit of guesswork when you want a form element to fill a fixed width and you want textfields to be as wide as textareas.
Then stop wanting such things.
The widths are for convenient input, not for the author's esthetic eye.
> Now, we can use a bit of CSS to set the width and for textareas also the height.
That doesn't mean we should.
> Is that a good idea, and if so should I still set size, cols and rows?
Consider the CSS Caveats: http://www.cs.tut.fi/~jkorpela/css-caveats.html
Besides, the cols and rows attributes are required in a textarea element
by HTML syntax. And you should always set the size attribute for a
single-line text input field, since its default value is unspecified.
> It seems like every few years I have to unlearn something.
Indeed. But that's a different story.
Scripsit Jeff:
I never was fond of scrollbars on textareas, so on
textareas that could need to be very long (or not at all), I simple
add a couple rows when needed. Been doing it for 4 or 5 years. As far
as I know,
I'm the only one that does that.
Now you're explaining something that you yourself characterize as
unique, and later you're telling that you work with px dimensioned
layout as so many others. Somehow this does not add up.
No complaints so far.
Web users don't complain. They just go away, or don't get the job done,
or start hating the site.
>Anyway, 4 is far from sufficient for any normal textarea.
Actually I find most textarea needs are far less than that.
I'm speechless. See above. It's an insult to users to ask them to send
feedback, or add any comments, and allocate the ridiculous four lines
for it.
Aesthetics my boy. Edges should line up. Set a width for you form,
either in % or pixels and the right edges should align. Just as the
left do.
That's poor usability, since the lengths of fields don't act as clues
any more.
--
Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
Scripsit Jukka K. Korpela:
There's no "half-replaced element" concept in CSS, so any _partial_
support to CSS features for, say, <inputelements violates CSS
specifications (or "specifications").
Oops. My conclusion is not correct, due to a specific looseness
statement in the CSS 2.1 draft:
"CSS 2.1 does not define which properties apply to form controls and
frames, or how CSS can be used to style them. User agents may apply CSS
properties to these elements. Authors are recommended to treat such
support as experimental. A future level of CSS may specify this
further." http://www.w3.org/TR/CSS21/conform.html#conformance
So browsers may "legimately" ignore all style sheet rules for form
fields, or implement them, or anything between these two extremes.
Moreover, the CSS 2.1 draft does not specify _how_ the properties might
apply to fields; for example, if you set the background of a radio
button, does this mean the thing inside the circle, or a hypothetical
rectangle around it, or both?
The looseness statement is not present in CSS 2.0, which is, unlike CSS
2.1, a "W3C Recommendation", though not recommended by the W3C. In
practice, it's a useful warning.
--
Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
Jukka K. Korpela wrote:
>
This vagueness reflects the fact that browsers have used built-in
routines of underlying systems to implement form fields,
That seems only partially true, or more specifically, they may partially
use built-in routines of underlying systems.
Safari, for example, seems to ignore styling of submit buttons, but it
doesn't just take the default styling of the O/S, either. The Windows
version of Safari styles form fields unlike anything else in my whole
system. Ditto Opera.
--
Berg
Jukka K. Korpela wrote:
Scripsit Jeff:
>I never was fond of scrollbars on textareas, so on textareas that could need to be very long (or not at all), I simple add a couple rows when needed. Been doing it for 4 or 5 years. As far as I know, I'm the only one that does that.
Now you're explaining something that you yourself characterize as
unique, and later you're telling that you work with px dimensioned
layout as so many others. Somehow this does not add up.
Now, you've snipped that without noting and removed the meaning in the
process.
>
>No complaints so far.
Web users don't complain. They just go away, or don't get the job done,
or start hating the site.
>>Anyway, 4 is far from sufficient for any normal textarea.
Actually I find most textarea needs are far less than that.
I'm speechless. See above. It's an insult to users to ask them to send
feedback, or add any comments, and allocate the ridiculous four lines
for it.
Surely you realize that there are many other uses for textareas? You
were just talking about how a textfield is often insufficient.
My default is either 4 or 5. Making forms is a typical thing to do, so
like any programmer would, I have a utility where you input the field
names, label, types... and that spits out an editable form with the
database table code. Sizes can get fine tuned from there and styles
added. Perhaps you haven't seen enough live data to get a feel for what
web surfers do... Or that feedback is only one use, and certainly you
would have more than 4 rows for such a textarea. I certainly don't spend
my time writing contact forms and I know of no one else who does. But if
you have a typical form with perhaps a half dozen or so of textfields,
options and textareas you don't want to make all the textareas so long
that the page scrolls and scrolls and scrolls, that is discouraging to a
user. You should be able to see the end.
Jeff
>
>Aesthetics my boy. Edges should line up. Set a width for you form, either in % or pixels and the right edges should align. Just as the left do.
That's poor usability, since the lengths of fields don't act as clues
any more.
Well, I don't understand how you could come the end of a textarea and
not know you were there.
>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Salad |
last post by:
What do you do when you've designed an app at 800x600 and you now want
to make use of higher res?. It's an internal app and won't be
distributed to the world.
I'm sometimes asked to squeeze in...
|
by: Ron Vecchi |
last post by:
I know the math I need to perform on width and height to keep an aspect
ratio but where and how would I implement keeping a set aspect ratio on a
form when a user resizes it. Override OnResize?...
|
by: Peteroid |
last post by:
It looks like when I make a Form resizable and/or hit the maximize button
that it shows garbage (unitialized memory) for the new portions of the form
and then fills it in with background color. It...
|
by: Galen Somerville |
last post by:
My current screen resolution is set to 1024 x 768. My form size always comes
up as 1032 x 748.
I have tried the help sample
' Retrieve the working rectangle from the Screen class
' using the...
|
by: Rico |
last post by:
Hello,
I have an ole object field (Access XP/2002) which I store images in. I have
a couple of questions regarding this; is it possible to determine the image
dimensions? Secondly, is there...
|
by: James |
last post by:
CWinFormsDialog in .net 2.0 lets you host a .Net UserControl as a dialog in a
managed C++ MDI application.
I.e. in the sample:
-----------------------------------------------
#include...
|
by: NowItsWhatever |
last post by:
In query DESIGN view, how do I automatically "fit" the columns in the
table/field grid to the lengths of the table and field names (including any
functions applied to the fields). I am not talking...
|
by: =?Utf-8?B?bGpsZXZlbmQy?= |
last post by:
I want to implement the following:
If the user clicks on the border of a form, then I want to show a box around
the form that represents the form's bounds. As the user moves the mouse only
the...
|
by: R.A.F. |
last post by:
Hi,
Basically i've read that under C++ we can avoid flickering forms during
sizing (maximize, minimize, restore,...) in SDi/MDI application.
I understood that for that i need to override the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |