using tables to align text and textarea

B

bbxrider

been trying to use tables with rowspan to horizontally align text prompts
and a multiline textarea but so far not working
<tr>
<td rowspan="2"> prompt for text area </td>
<td> <TEXTAREA cols=30 rows= 2 wrap name="prevExperText" value="">
</TEXTAREA> </td>
<tr>
can this be done?
 
B

Blindsya

been trying to use tables with rowspan to horizontally align text prompts
and a multiline textarea but so far not working
<tr>
<td rowspan="2"> prompt for text area </td>
<td> <TEXTAREA cols=30 rows= 2 wrap name="prevExperText" value="">
</TEXTAREA> </td>
<tr>
can this be done?

Using a table to align or position components is a no no. It won't behave
properly outside of IE.
 
B

Blindsya

Been trying to use tables with rowspan to horizontally align text prompts
and a multiline textarea but so far not working
<tr>
<td rowspan="2"> prompt for text area </td>
<td> <TEXTAREA cols=30 rows= 2 wrap name="prevExperText" value="">
</TEXTAREA> </td>
Using a table to align or position components is a no no. It won't behave
properly outside of IE.

Sorry, what I meant to say:
Using a table to align or position components of a form is a no no. It
won't behave properly outside of IE.
 
B

bbxrider

thanx for the reply,
wow thats seems to be big news, so just to be perfectly clear
so no tables of any kind in a form??
just use breaks, spaces, tabs etc to do all the formatting?
 
E

EightNineThree

Blindsya said:
and a multiline textarea but so far not working
<tr>
<td rowspan="2"> prompt for text area </td>
<td> <TEXTAREA cols=30 rows= 2 wrap name="prevExperText" value="">
</TEXTAREA> </td>
behave
properly outside of IE.

Sorry, what I meant to say:
Using a table to align or position components of a form is a no no. It
won't behave properly outside of IE.

Wow. So like, millions of forms all over the internet fail because the form
elements are positioned with tables?

I agree that positioning form elements with tables is bad, but forms *do*
still render and operate just fine with browsers other than IE.
 
D

Davmagic com

From: (e-mail address removed) (bbxrider)
been trying to use tables with rowspan to >horizontally align text
prompts and a >multiline textarea but so far not working

The trick is to put your table WITHIN your Form tags:

Wrong: <table><tr><td><form><textarea></form></td></tr></table>

Correct: <form><table><tr><td><textarea></td></tr></table></form>



Web Design-Magic-Painting-Junking-Games
INFO 2000 For You
http://www.davmagic.com
 
A

Adrienne

thanx for the reply
if you can't use tables at all, is there another way to setup columns
etc without having to code all the spaces etc

You CAN use tables for form layout, although it is ill advised. Here's a
simple form:
<form method="post" action="somepage" id="tableform">
<table summary="A table used to layout a form">
<caption>Fill Out the Form</caption>
<colgroup span="2" valign="top">
<col align="right" width="20%" />
<col align="left" width="80%" />
</colgroup>
<tr>
<td colspan="2">Name and Address Information</td>
</tr><tr>
<td><label for="name">Name: </label></td><td><input type="text"
name="name" id="name" /></td>
</tr><tr>
<td><label for="address">Address </label></td><td><input type="text"
name="address" id="address" /></td>
</tr><tr>
<td colspan="2"><p style="text-align:center"><input type="submit"
value="Submit" />&nbsp;&nbsp;<input type="reset" value="Cancel" /></p></td>
</tr>
</table>
</form>

Better:
<form method="post" action="somepage" id="regularform">
<fieldset><legend>Name and Address Information</legend>
<label for="name">Name: </label> <input type="text" name="name"
id="name" /><br />
<label for="address">Address </label> <input type="text" name="address"
id="address" />
</fieldset>
</form>

You can then use CSS to style the elements of the form more easily.
 
B

bbxrider

ok now am getting confused,
is it hit or miss if tables will work ok with forms outside of IE? there
seems to be opinions here

is coding the table within the form tags ok for all browsers?? this seems a
simple solution
 
J

Jacqui or (maybe) Pete

bbxrider1 said:
been trying to use tables with rowspan to horizontally align text prompts
and a multiline textarea but so far not working
<tr>
<td rowspan="2"> prompt for text area </td>
<td> <TEXTAREA cols=30 rows= 2 wrap name="prevExperText" value="">
</TEXTAREA> </td>
<tr>
can this be done?
You don't need the rowspan; the rows on the textarea are nothing to do
with table rows. If you don't like where the prompt goes then use css
to align it vertically.

Some people don't like tables used for form layout, but there's quite a
lot of argument about this so I shouldn't worry about it too much -
although if you find yourself using nested tables then you probably need
to rethink your design.

Here's a small example of a form laid out in a table with some (probably
too much!) css used to style it:

http://porjes.com/tform.html

I've dropped in your textarea (modified a bit) to show you how it's
done.
 
J

John W.

bbxrider said:
"Davmagic com"
ok now am getting confused,

no need
is it hit or miss if tables will work ok with forms outside of IE? there
seems to be opinions here
hit

is coding the table within the form tags ok for all browsers?? this seems a
simple solution
<form><table></table></form> works fine


--
John W.
<http://webcel.nl/>

"Time is what prevents everything from happening at once"
- John Archibald Wheeler -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top