Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2008
    Posts
    33
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Input Box Questions?

    How can I make an input box look taller showing room for 2, or 3 lines of text? Like "size" for the boxes height?

    Also I have used the "value=optional" parameter to show that input is optional, how can I make that appear grey to the users? Then when they start typing their input is still looks black? Thanks a lot guys.
    Last edited by WorldVision; 05-07-2009 at 07:49 AM.

  • #2
    Regular Coder
    Join Date
    Mar 2009
    Location
    Portland Oregon
    Posts
    690
    Thanks
    44
    Thanked 63 Times in 62 Posts
    You should be able to style it with CSS for the height and width, as far as I know. I've never tried.

    here's the focus script for text input. You'll have to make changes of course, but I hope it's a good start for you. I'm sorry that the focus only changes the style in firefox. I don't know why it doesn't work in IE
    Code:
    <!DOCTYPE html>
    <title>testing autofocus (Web Forms 2)</title>
    <style>
     input{ background:red ;color:white;font-family:Comic Sans MS Bold  }
     input:focus{ background:white;color:red;font-family:impact }
    </style>
    <p>This form control should have a switched background: <input autofocus>


  •  

    Posting Permissions

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