Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the height of a <textarea>

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
Hi,

I am trying to make a textarea take up an entire cell that has a rowspan of 3:

<td rowspan="3" valign="top"><textarea style="height: 100%"></textarea></td>

For some reason it is still only one character high.

Any ideas?

Thanks very much

Ed
 
I'm trying to make it 100% height of the cell (where the X is). Please excuse the poor diagram making skills!

----------------
| | |
----------------
| | |
--------| |
| | X |
--------| |
|_______|______|
 
styling textareas to 100% height won't work unless you're in quirks mode. you'd most likely need some javascript to really complete what you're trying to do in a non-quirky web page.



*cLFlaVA
----------------------------
[tt]somebody set up us the bomb![bomb][/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
This seems to work in FF and Safari on a Mac. I've not got a Windows machine to hand at the moment though.

This shouldn't be in quirks mode... or is it... I have a migraine!

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"[URL unfurl="true"]http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head> 
<title>Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head>

<body>
<table border="1" width="450" height="400">
	<tr>
		<td width="450">1</td><td width="450">2</td><td width="450">3</td>
	</tr>
	<tr>
		<td>4</td><td>5</td><td style="height:150px"><textarea style="height:100%;margin:0;padding:0;" name="myTextArea">textarea</textarea></td>
	</tr>
	<tr>
		<td>7</td><td>8</td><td>9</td>
	</tr>
</table>
</body>
</html>

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top