Jump to content

Text Area - Setting Cursor Position to Top Left


justinbriggs1

Recommended Posts

My cursor appears in peculiar places in my text area depending on where it is clicked (like in the middle). I would like it to begin all input text from the top left corner when you click anywhere. The code is below:

<textarea cols="40" rows="5" name="description" wrap=physical></textarea>

If anyone knows an easy (or a difficult) way to fix this please let me know. Thanks,JW

Link to comment
Share on other sites

please post the full code for this page and what browser you are using.I did this quick test and it works fine.

<html><head>	<title>test</title></head><body><textarea cols="40" rows="5" name="description" wrap=physical></textarea></body></html>

Link to comment
Share on other sites

please post the full code for this page and what browser you are using.I did this quick test and it works fine.
<html><head>	<title>test</title></head><body><textarea cols="40" rows="5" name="description" wrap=physical></textarea></body></html>

Sure, here it is. And I have tested it in Firefox and IE7 on 2 separate machines, but you can still click in the box anywhere where a column and row intersect and start typing. Thanks for your help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>	<head>		<title>Command Line Technology</title>		<link rel=stylesheet href="style.css" type="text/css" media=screen>	</head>	<body>		<div id="page">			<div id="header">		</div>				<div id="mainarea">			<div id="contentarea">		<h2>Mobile Computer Repair and Service for Virginia Beach</h2>				<font size = "3"><b>- $60 Flat Rate for Most In-Home Services!		<br/>		- Experienced Technicians		<br/>		- Available for Emergencies		<br><br><br></b></font>						<b><font size = "4">Service Request Form</font></b><br><br>		Please make sure you leave us contact information!		<form action="confirm.php" method="post"> 		<table border="0">			<tr>				<td>Name:</td>				<td>					<input name="custname" type="text" />				</td>			</tr>						<tr>				<td>Email:</td>				<td>					<input name="email" type="text" />				</td>			</tr>						<tr>				<td>Phone:</td>				<td>					<input name="phone" type="text" />				</td>			</tr>						<tr>				<td>Operating System:</td>				<td>					<select name="os"> 						<option>Windows Vista</option>						<option>Windows XP</option>						<option>Windows 2000</option>						<option>Windows 95/98</option>						<option>Other...</option>					</select>				</td>			</tr>							<tr>				<td>Type:</td>  				<td>						<input type="radio" name="type" value="Desktop"> Desktop					<input type="radio" name="type" value="Laptop" checked> Laptop				</td>			</tr>							<tr>				<td>Manufacturer:</td>				<td>					<select name="manufacturer"> 					<option>Compaq</option>					<option>Dell</option>					<option>Gateway</option>					<option>HP</option>					<option>IBM</option>					<option>Sony</option>					<option>Toshiba</option>					<option>Other...</option>					</select>				</td>			</tr>						<tr>				<td>Model:</td>				<td>					<input name="model" type="text" />				</td>			</tr>						<tr>				<td>What can we assist					<br>you with?  (Please					<br>be as descriptive					<br>as possible)</td>				<td>										<textarea cols="40" rows="5" name="description" wrap=physical>										</textarea>				</td>			</tr>				<br>			<br>				</table>		<input type="submit" value= "Submit Request" />		</form>	</div>	<div id="sidebar">				<font size = "3"><b>Services:</b></font>		<font size = "3">		<br/>		Spyware/Adware/Virus Removal		<br/>		PC Optimization		<br/>		Crash Recovery		<br/>		Hardware Installation		<br/>		Software Installation		<br/>		Wireless Network Setup		<br/>		</font>	</div>	</div>	<div id="footer">		<p>Copyright (c) 2008 Command Line Technology <br/>			All Rights Reserved.</p>	</div>	</div></body></html></html>

Link to comment
Share on other sites

					<textarea cols="40" rows="5" name="description" wrap=physical>										</textarea>

It's because of all the whitespace between the two tags. Put the ending tag directly after the beginning tag. Those spaces are what you're clicking on in the text area.

Link to comment
Share on other sites

					<textarea cols="40" rows="5" name="description" wrap=physical>										</textarea>

It's because of all the whitespace between the two tags. Put the ending tag directly after the beginning tag. Those spaces are what you're clicking on in the text area.

Good call, that fixed it! Thanks,JW
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...