Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Top Alignment in a Textbox

I have a text input field in a form.  I want the type to align top left.  Now its in the middle left.  How can I fix that?

<td><input name="item4" type="text" class="FreeForm" valign="top" id="item4" value="Type Your Order Here" size="200" />

Open in new window

0
DS928
Asked:
DS928
  • 4
  • 4
  • 4
  • +2
1 Solution
 
GaryCommented:
Do you mean like this
http://jsfiddle.net/8PVdh/
0
 
Ishaan RawatDesigner | Developer | ProgrammerCommented:
<td><input name="item4" type="text" class="FreeForm" valign="top" id="item4" value="Type Your Order Here" size="200" style="text-align: left; padding-top: 0px;" />

Open in new window


try this...
0
 
DS928Author Commented:
Thank you.
I tried both and neither one did it.  Here is the page...
http://www.menuhead.com/makeorder.php
it's the bottom text field.  "Customer Order"
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
GaryCommented:
You want a textarea not an input.
0
 
DS928Author Commented:
Just got your order! LOL!  So how do I do this?

<td><input name="item4" type="text" class="FreeForm" valign="top" id="item4" value="Type Your Order Here" size="200" />

Open in new window

0
 
jrm213jrm213Commented:
If your text box has a height set to it so it is larger than the text, the text will always be centered vertically in the box, you can't change it, and messing with padding or margins will cause issues cross browser. If you want your textbox to be taller but have the text vertically aligned to the top, use <textarea></textarea> instead of <input type="text"></input>
0
 
jrm213jrm213Commented:
hah, didn't see GaryC123's answer, started to answer, went to lunch and submitted.
0
 
Ishaan RawatDesigner | Developer | ProgrammerCommented:
<textarea rows="6" columns="14"></textarea>

Open in new window


try something like this...

change the rows and columns as per your needs..
0
 
DS928Author Commented:
Tried this....quite a mess!

<td><textarea name="item4" id="item4" value="Type Your Order Here" size="200" /textarea>
                                </td>

Open in new window

0
 
COBOLdinosaurCommented:
A text type input field is for single line input.  As it appears you are looking for multi-line input then you should be doing a Gary says and use a text area.

An input is not going to allow multi-line, and the text is not going to wrap.

Please spend a few minutes on a site with basic HTML tutorials to learn the basic use of the form elements.

Cd&
0
 
GaryCommented:
You missed the starting tag

<td><textarea name="item4" id="item4" value="Type Your Order Here" size="200" </textarea>
                                </td>
0
 
Ishaan RawatDesigner | Developer | ProgrammerCommented:
<td><textarea name="item4" id="item4" value="Type Your Order Here" rows="4" columns="15" /textarea>
                                </td>

Open in new window


try something like this...
0
 
GaryCommented:
<td>
<textarea name="item4" id="item4" value="Type Your Order Here" size="200"> </textarea>
</td>


Forgot the ending tag myself
0
 
DS928Author Commented:
This works....

<td><textarea rows="4" cols="50" name="item4" id="item4" value="Type Your Order Here">Type Your Order Here</textarea>
                                </td>

Open in new window

0
 
Ishaan RawatDesigner | Developer | ProgrammerCommented:
<td>
<textarea name="item4" id="item4" value="Type Your Order Here" rows="6" cols="20"> </textarea>
</td> 

Open in new window


Text area do not have size as an attribute... use cols and rows instead...
Check here...
http://www.w3schools.com/tags/tag_textarea.asp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 4
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now