Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > issue with textarea and rowspan

Reply
Thread Tools

issue with textarea and rowspan

 
 
graphicsxp@googlemail.com
Guest
Posts: n/a
 
      10-30-2008
Hi,

I can't get my textarea to fill in the TD it belongs to. Consider the
following :

<table>
<tr>
<td rowspan="3" style="width:50%">
<textarea id="txtComments" style="height: 100%; width:100%"
tabindex="6"></textarea>
</td>
<td style="text-align:right;"><span
class="itemLabel">Journalist</span></td>
<td>
<input id="txtJournalist" style="width:180px" tabindex="3"/
>

</td>
</tr>
<tr>
<td style="text-align:right;">
<span class="itemLabel">Readership</span>
</td>
<td>
<input id="txtReadership" value="0" tabindex="5"/>
</td>
</tr>
<tr>

<td style="text-align:right;">
<span class="itemLabel">Ave</span>
</td>
<td>
<input id="txtAVE" value="0" tabindex="4"/>
</td>
</tr>
</table>


As you can see the first td should span across 3 rows and it does, but
the textarea doesn't !

Can you help ?
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      10-30-2008
Gazing into my crystal ball I observed "(E-Mail Removed)"
<(E-Mail Removed)> writing in news:6eafb707-e1dc-4d41-a999-
http://www.velocityreviews.com/forums/(E-Mail Removed):

> Hi,
>
> I can't get my textarea to fill in the TD it belongs to. Consider the
> following :
>


A URL would be much better. Having said that, your markup is a
maintenance nightmare, for several reasons.

1. Inline styles mean that if you want to change something later, you
have to go into each page with that style and change it. This is the
reason for using an external style sheet, so that one change to the
stylesheet changes the entire application.

2. Prefixing an id name with its type is also a nightmare, especially
server side, when you want to put form contents into a db. You have to
tell the script that txtComments is a the db field comments. You would
be a lot better off just naming the form fields that same name as the db
fields. You can do a lot more programatically, and reuse code, which
will save a lot of time and maintenance headaches in the future.

3. Abuse of tables. There are some that say that a form qualifies as
tabular data. However, you would be better served using the label
element and styling it accordingly.

<snip>


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
 
graphicsxp@googlemail.com
Guest
Posts: n/a
 
      10-30-2008
On 30 oct, 13:20, Adrienne Boswell <(E-Mail Removed)> wrote:
> Gazing into my crystal ball I observed "(E-Mail Removed)"
> <(E-Mail Removed)> writing in news:6eafb707-e1dc-4d41-a999-
> (E-Mail Removed):
>
> > Hi,

>
> > I can't get my textarea to fill in the TD it belongs to. Consider the
> > following :

>
> A URL would be much better. *Having said that, your markup is a
> maintenance nightmare, for several reasons.
>
> 1. Inline styles mean that if you want to change something later, you
> have to go into each page with that style and change it. *This is the
> reason for using an external style sheet, so that one change to the
> stylesheet changes the entire application.
>
> 2. Prefixing an id name with its type is also a nightmare, especially
> server side, when you want to put form contents into a db. *You have to
> tell the script that txtComments is a the db field comments. *You would
> be a lot better off just naming the form fields that same name as the db
> fields. *You can do a lot more programatically, and reuse code, which
> will save a lot of time and maintenance headaches in the future.
>
> 3. Abuse of tables. *There are some that say that a form qualifies as
> tabular data. *However, you would be better served using the label
> element and styling it accordingly.
>
> <snip>
>
> --
> Adrienne Boswell at Home
> Arbpen Web Site Design Serviceshttp://www.cavalcade-of-coding.info
> Please respond to the group so others can share


Hi,
Thanks for the reply but you are not really answering my question.
Regarding the inline style, they are only for the example and I do use
stylesheets.
If you copy/paste the code I gave you will see the issue I'm talking
about. The textarea is not filling up the TD, whatever the browser is.
Is there a reason for that ?
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      10-30-2008
Gazing into my crystal ball I observed "(E-Mail Removed)"
<(E-Mail Removed)> writing in news:7526291b-475a-4d5b-a2cd-
(E-Mail Removed):

> If you copy/paste the code I gave you will see the issue I'm talking
> about. The textarea is not filling up the TD, whatever the browser is.
> Is there a reason for that ?
>


You really need to supply a URL. I am not going to open my editor, and
copy and paste your markup, especially when I do not have other markup that
you did not post here that may have an effect on your issue. Doctype,
external, and/or style level CSS may all have an effect that I would not be
able to verify without the actual markup.

If this is something that is for an intranet, then I suggest you post the
page somewhere on the Internet. There are plenty of free hosting services
available if your ISP does not provide one.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-30-2008
(E-Mail Removed) wrote:

>
> Hi,
> Thanks for the reply but you are not really answering my question.
> Regarding the inline style, they are only for the example and I do use
> stylesheets.
> If you copy/paste the code I gave you will see the issue I'm talking
> about. The textarea is not filling up the TD, whatever the browser is.
> Is there a reason for that ?


In addition to all the *valid* points that Adrienne raised, for
TEXTAREAs the "rows" and "cols" attributes are *not* optional.

http://www.w3.org/TR/html4/interact/...#edef-TEXTAREA

Next a TEXTAREA is typically sized to fit a particular number of rows
and columns of content text, not visual dimensions.

In you snippet we cannot tell if your are triggering quirks mode that
would definitely relate to how CSS rules a applied for different browser.

And lastly, "width: 100%" and "height: 100%" only works when the
containing block element has explicit dimensions...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
graphicsxp@googlemail.com
Guest
Posts: n/a
 
      10-30-2008
On 30 oct, 13:41, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> (E-Mail Removed) wrote:
>
> > Hi,
> > Thanks for the reply but you are not really answering my question.
> > Regarding the inline style, they are only for the example and I do use
> > stylesheets.
> > If you copy/paste the code I gave you will see the issue I'm talking
> > about. The textarea is not filling up the TD, whatever the browser is.
> > Is there a reason for that ?

>
> In addition to all the *valid* points that Adrienne raised, for
> TEXTAREAs the "rows" and "cols" attributes are *not* optional.
>
> http://www.w3.org/TR/html4/interact/...#edef-TEXTAREA
>
> Next a TEXTAREA is typically sized to fit a particular number of rows
> and columns of content text, not visual dimensions.
>
> In you snippet we cannot tell if your are triggering quirks mode that
> would definitely relate to how CSS rules a applied for different browser.
>
> And lastly, "width: 100%" and "height: 100%" only works when the
> containing block element has explicit dimensions...
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com


Hi Jonathan,
Thanks for the reply, that helps. The cols and rows parameter are
indeed making a difference. Apparently the height of my textarea is
changed according to the value of cols. That also makes its td
growing. However that is the opposite effect that I want. I'd like the
textarea to fit the td !
Is there a way of doing so ? if not I may have to use javascript.

 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-30-2008
(E-Mail Removed) wrote:
> On 30 oct, 13:41, "Jonathan N. Little" <(E-Mail Removed)> wrote:
>> (E-Mail Removed) wrote:
>>
>>> Hi,
>>> Thanks for the reply but you are not really answering my question.
>>> Regarding the inline style, they are only for the example and I do use
>>> stylesheets.
>>> If you copy/paste the code I gave you will see the issue I'm talking
>>> about. The textarea is not filling up the TD, whatever the browser is.
>>> Is there a reason for that ?

>> In addition to all the *valid* points that Adrienne raised, for
>> TEXTAREAs the "rows" and "cols" attributes are *not* optional.
>>
>> http://www.w3.org/TR/html4/interact/...#edef-TEXTAREA
>>
>> Next a TEXTAREA is typically sized to fit a particular number of rows
>> and columns of content text, not visual dimensions.
>>
>> In you snippet we cannot tell if your are triggering quirks mode that
>> would definitely relate to how CSS rules a applied for different browser.
>>
>> And lastly, "width: 100%" and "height: 100%" only works when the
>> containing block element has explicit dimensions...
>>


<snip signatures in Usenet>

> Hi Jonathan,
> Thanks for the reply, that helps. The cols and rows parameter are
> indeed making a difference. Apparently the height of my textarea is
> changed according to the value of cols.


I think you mean "rows", cols determine the number of characters *wide*

> That also makes its td
> growing.


The default behavior for tables! They are supposed to expand to fit
content. One of the many reasons *not* to use tables for layout.


> However that is the opposite effect that I want. I'd like the
> textarea to fit the td !


You must have missed my last point. Hint: what are the CSS box
dimensions of the containing TD? Also who knows what you have in the
rest of your page that may affect the layout

> Is there a way of doing so ? if not I may have to use javascript.
>



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      10-30-2008
In article <adcd1$4909c1bb$40cba7c8$(E-Mail Removed)>,
"Jonathan N. Little" <(E-Mail Removed)> wrote:

> > That also makes its td
> > growing.

>
> The default behavior for tables! They are supposed to expand to fit
> content. One of the many reasons *not* to use tables for layout.


No doubt you mean this in a particular way and context that makes it
true. But I point out that this is often a *particularly* good reason to
use tables for layout where you want flexibibility to suit the users
screen...

--
dorayme
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-30-2008
dorayme wrote:
> In article <adcd1$4909c1bb$40cba7c8$(E-Mail Removed)>,
> "Jonathan N. Little" <(E-Mail Removed)> wrote:
>
>>> That also makes its td
>>> growing.

>> The default behavior for tables! They are supposed to expand to fit
>> content. One of the many reasons *not* to use tables for layout.

>
> No doubt you mean this in a particular way and context that makes it
> true. But I point out that this is often a *particularly* good reason to
> use tables for layout where you want flexibibility to suit the users
> screen...
>


Fine, if that is what you wish, but that is not what the OP wanted.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
graphicsxp@googlemail.com
Guest
Posts: n/a
 
      10-30-2008
On 30 Oct, 21:07, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> dorayme wrote:
> > In article <adcd1$4909c1bb$40cba7c8$(E-Mail Removed)>,
> > *"Jonathan N. Little" <(E-Mail Removed)> wrote:

>
> >>> That also makes its td
> >>> growing.
> >> The default behavior for tables! They are supposed to expand to fit
> >> content. One of the many reasons *not* to use tables for layout.

>
> > No doubt you mean this in a particular way and context that makes it
> > true. But I point out that this is often a *particularly* good reason to
> > use tables for layout where you want flexibibility to suit the users
> > screen...

>
> Fine, if that is what you wish, but that is not what the OP wanted.
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com


er...yes I do use table to fit the users screen ! I never said I
didn't. Anyway this Textarea control is really annoying. Ideally there
should be no need to set its cols and rows properties and setting the
width and height to 100% should be enough. Instead I have to give a
value to the rows properties in order to control its height. And
surprise surprise... results are different in FF and IE...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Explorer and simple rowspan usage William HTML 8 01-14-2007 10:44 PM
Textarea Inside of a textarea wperry1@gmail.com ASP General 6 02-05-2006 08:00 AM
Colspan and rowspan Klaus Wertler HTML 8 11-27-2003 10:02 PM
colspan and rowspan problems Bruce W...1 HTML 2 10-22-2003 10:06 PM
Removing carriage returns from <textarea></textarea> input Augustus ASP General 1 09-10-2003 04:55 AM



Advertisments