Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    202

    Unanswered: Changes In Textbox

    Hi,

    Can anyone tell me how to change the font,color and alignment in a textbox
    from HTML page (ASP)?
    Thanx a lot

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    It has nothing to do with Java, no?

    What you need is called "CSS", or "Cascading Style Sheets". E.g.:
    Code:
    <input type="text" name="textbox1" value="test" 
    style="background-color:red; color:white; font-weight:bold; text-align:right; font:Helvetica"/>

  3. #3
    Join Date
    Feb 2005
    Posts
    10

    That is correct

    As said N_i above, if you are using a style sheet , write the styles you want for the input box or text box . name it .
    and specify where ever you want to apply to the text or input box or button
    as class-"yourstle name".
    hoep this helps

    Vijay

  4. #4
    Join Date
    Mar 2004
    Posts
    202
    Hi vjkiran,

    Thanx for the idea but i kinda confuse of the way how it is done.Maybe you have a small sample which u can show me.
    Thanx.Appreciate your help

  5. #5
    Join Date
    Feb 2005
    Posts
    10

    Samples

    1.
    Ok Add the below lines in a .css file and it as a include in your jsp or asp page


    .subtitle {
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 10pt;
    font-weight: bold;
    font-style: bold;
    line-height: 11pt;
    color: black;
    }

    .text {
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 8pt;
    font-weight: normal;
    font-style: normal;
    line-height: 10pt;
    color: black;
    }

    .list {
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 8pt;
    font-weight: normal;
    font-style: normal;
    line-height: 10pt;
    color: black;
    list-style-image: url(../images/blue_bullet.gif);
    }



    2. In the jsp page or asp or html where ever you need to use these styles.

    for example a paragraph
    when you start a <p class= subtitle> vijay </p>
    or for a TD tag
    <td class=text> TOTAL </td>

    Or fo r a input box or button like where ever you want add

    <input type="submit" name="Next" value="Next" class=text>


    I hope this helps

    Vijay B

  6. #6
    Join Date
    Mar 2004
    Posts
    202
    Hi Vijay,

    Thanx a lot.
    It helps me a lot with the code you've provided.
    Thanx again.
    Appreciate your help

Posting Permissions

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