![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am defining a Text Area where I set it to 20 Rows and Width of 40em in my CSS code. Do I need to define the cols? |
|
In this case what is the difference between cols and width? |
|
I suppose I cannot define the cols in CSS. |
#3
| |||
| |||
|
|
On 2008-09-03, shapper <mdmoura (AT) gmail (DOT) com> wrote: I am defining a Text Area where I set it to 20 Rows and Width of 40em in my CSS code. Do I need to define the cols? No, but you can |
#4
| |||
| |||
|
|
Ben C wrote: On 2008-09-03, shapper <mdmo... (AT) gmail (DOT) com> wrote: I am defining a Text Area where I set it to 20 Rows and Width of 40em in my CSS code. Do I need to define the cols? No, but you can http://www.w3.org/TR/html401/interac...#edef-TEXTAREA Note the required fields. -- Berg |
#5
| |||
| |||
|
|
On 2008-09-03, shapper <mdmo... (AT) gmail (DOT) com> wrote: Hello, I am defining a Text Area where I set it to 20 Rows and Width of 40em in my CSS code. Do I need to define the cols? No, but you can-- then people who aren't using CSS will get what you set for cols instead of the 40em. In this case what is the difference between cols and width? Cols is supposed to give you the width of an "average" character. Width sets a width in one of the usual CSS units (which don't include "width of average character"). If you set both, the CSS width wins in most browsers. I suppose I cannot define the cols in CSS. Correct. |
#6
| |||
| |||
|
|
Ben C wrote: On 2008-09-03, shapper <mdmoura (AT) gmail (DOT) com> wrote: I am defining a Text Area where I set it to 20 Rows and Width of 40em in my CSS code. Do I need to define the cols? No, but you can http://www.w3.org/TR/html401/interac...#edef-TEXTAREA Note the required fields. |
#7
| |||
| |||
|
|
On Sep 3, 3:10*pm, Ben C <spams... (AT) spam (DOT) eggs> wrote: On 2008-09-03, shapper <mdmo... (AT) gmail (DOT) com> wrote: Hello, I am defining a Text Area where I set it to 20 Rows and Width of 40em in my CSS code. Do I need to define the cols? No, but you can-- then people who aren't using CSS will get what you set for cols instead of the 40em. In this case what is the difference between cols and width? Cols is supposed to give you the width of an "average" character. Width sets a width in one of the usual CSS units (which don't include "width of average character"). If you set both, the CSS width wins in most browsers. I suppose I cannot define the cols in CSS. Correct. If the TextArea has, let's say 100 columns, and is inside a DIV of 50px width will the Text Area expand the width? |
#8
| |||
| |||
|
|
On Sep 3, 3:56 pm, Bergamot <berga... (AT) visi (DOT) com> wrote: http://www.w3.org/TR/html401/interac...#edef-TEXTAREA Note the required fields. Yes, I knew that but somehow without cols I got my HTML validated ... |
#9
| |||
| |||
|
|
shapper wrote: On Sep 3, 3:56 pm, Bergamot <berga... (AT) visi (DOT) com> wrote: http://www.w3.org/TR/html401/interac...#edef-TEXTAREA Note the required fields. Yes, I knew that but somehow without cols I got my HTML validated ... The W3C validator gives an error when cols is omitted. e.g. Error: required attribute "COLS" not specified . textarea name="x" rows="20"></textarea -- Berg |
![]() |
| Thread Tools | |
| Display Modes | |
| |