How to change the colour of text in a form textfield?

Discussion in 'HTML & Website Design' started by Custard, Jan 26, 2007.

  1. #1
    Hi All,

    I have added pre-loaded text to a forms text field, but need to format the text. I have tried straignt HTML but it doesnt seem to have an effect?

    Can anybody advise on how to do this?

    Thank you.
     
    Custard, Jan 26, 2007 IP
  2. unitedrokz

    unitedrokz Peon

    Messages:
    86
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    its a bit hard to say without seeing your code... post up the bit of code (form field) you want to change and we can help you out more.
     
    unitedrokz, Jan 26, 2007 IP
  3. Custard

    Custard Peon

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Here is the code I am currently using:

    <textarea class="input-text" name="customer_notes" cols="45" rows="26" style="width: 100%;">

    Here is the text for the form.

    And here is a seperate line.

    </textarea>



    I would like the text to be in red. Any ideas?
     
    Custard, Jan 26, 2007 IP
  4. moroswitie

    moroswitie Peon

    Messages:
    43
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <textarea class="input-text" name="customer_notes" cols="45" rows="26" style="width: 100%; color: #ff0000; font-weight: normal;">
    
    Here is the text for the form.
    
    And here is a seperate line.
    
    </textarea>
    HTML:
    That should do the trick ;)

    It is nicer if you put stuff like this in a css file
     
    moroswitie, Jan 26, 2007 IP
  5. Valve-Hosting

    Valve-Hosting Peon

    Messages:
    1,071
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Its easy :S If you're using dreamweaver 8. Click on the box, click on new css rule in the css panel, if you've clicked on the box correctly it will auto select an advanced function with correct css operator, click ok then change it.
     
    Valve-Hosting, Jan 26, 2007 IP
  6. Custard

    Custard Peon

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It did do the trick.. thank you :)
     
    Custard, Jan 26, 2007 IP
  7. Valve-Hosting

    Valve-Hosting Peon

    Messages:
    1,071
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Valve-Hosting, Jan 26, 2007 IP