CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    113

    [RESOLVED] Aligning text to the top of an input control

    CSS isn't my strong suit but I really can't get this to work and would appreciate some help.
    I am trying to get the text entered into a large <INPUT> text control to be at the top left corner, which is how it appears in IE9, but in FF and Chrome it's left middle aligned. The CSS vertical-align:top; doesn't make any difference.

    Code:
    <input type="text" align="top" style="z-index: 110; position: absolute; width: 60px; height: 82px; top: 200px; left: 370px" class="" value="Test" id="Mytest3788" name="Mytest">
    In IE (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">) it displays an input box with Test in the top, however the same in Chrome and FF has Test in the middle and I cannot see how to change it. Is there no way to do this and I should be using a <TEXTAREA> instead?

  2. #2
    Join Date
    Jun 2009
    Posts
    113

    Re: Aligning text to the top of an input control

    I couldn't resolve this so I've redone it as a TEXTAREA instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured