proper CSS style for Textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahulephp
    New Member
    • Sep 2009
    • 59

    #1

    proper CSS style for Textbox

    I want to change the properties of text inside Textbox
    <input type="text" name="input" value="" />

    Can you please let me know proper CSS style for the same

    Thank you in anticipation
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by rahulephp
    I want to change the properties of text inside Textbox
    <input type="text" name="input" value="" />

    Can you please let me know proper CSS style for the same

    Thank you in anticipation
    First, I have moved your thread over here to the HTML/CSS forums. Since this is obviously a CSS question, it did not belong in the PHP forum. You need to please be sure and post your question under the most appropriate forum topic next time.... please.

    As for your question, what do you want to change? The input area will be blank until the user enters something. But, if you want to play with it to see if you can change it prior to the user entering anything (which I haven't tried or worried about before), you should add a class name to your input link and then, in your CSS play with the different attributes relating to font.

    Its not that I am unwilling to show you, but if you don't yet know CSS, then you really need to learn it and there is no time like the present when you need to do something, to learn it.

    Regards,

    Jeff

    Comment

    • TheServant
      Recognized Expert Top Contributor
      • Feb 2008
      • 1168

      #3
      Originally posted by rahulephp
      I want to change the properties of text inside Textbox
      <input type="text" name="input" value="" />

      Can you please let me know proper CSS style for the same

      Thank you in anticipation
      Either add a class to the input:
      Code:
      <input class="myclass" type="text" name="input" value="" />
      With the css:
      Code:
      .myclass { font-size: 6px; text-decoration: underline; }
      Or add a class to the surrounding div:
      Code:
      <div class="myclass">[indent]<input type="text" name="input" value="" />[/indent]
      </div>
      With the css:
      Code:
      .myclass input { font-size: 6px; text-decoration: underline; }

      Comment

      • tarunkhatri
        New Member
        • Sep 2009
        • 36

        #4
        If u dont want to use external style sheet u can use style properties as below.

        Code:
        <input type="text" style="text-align: right;" value ="">

        Comment

        Working...