text area question

Discussion in 'HTML & Website Design' started by MikeB67, Jul 20, 2008.

  1. #1
    I'm having troubles getting the background in my text area black, and the text white. In dream weaver it shows up fine but on my webpage it shows all black. This is the code I got so far.
    <textarea style="color:"FFFFFF" style="background:black" textarea="color:FFFFFF" cols="100" rows="5">test</textarea>
    Code (markup):
    :-/ can anyone help me?
     
    MikeB67, Jul 20, 2008 IP
  2. Elad Nava

    Elad Nava Member

    Messages:
    23
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #2
    There are browsers that do not support background color in textareas and inputs on purpose to maintain the browser's layout and design and not let Web sites take control of that but otherwise in other browsers it should work.
     
    Elad Nava, Jul 20, 2008 IP
  3. MikeB67

    MikeB67 Member

    Messages:
    575
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    35
    #3
    ^ Yea, I started thinking it was something like that. I think I might just stick with a white background and black text for it.
     
    MikeB67, Jul 21, 2008 IP
  4. Limotek

    Limotek Peon

    Messages:
    165
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I've managed to change the colours for a textarea on my website and it works ok in IE, Firefox and Safari. The only thing I was unable to change was the colours of the scroll bars (you can in Firefox but it doesn't work in IE).


    
    .formobject 
    {
    font-family: "Trebuchet MS",Arial,Helvetica,sans-serif;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    font-size: 1em;
    line-height: normal;
    font-size-adjust: none;
    font-stretch: normal;
    color: #ffffff;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-color: #626262;
    border-right-color: #626262;
    border-bottom-color: #626262;
    border-left-color: #626262;
    background-color: #000000;
    padding-top: 2px;
    padding-right: 2px;
    padding-bottom: 2px;
    padding-left: 2px;
    }
    Code (CSS):
    <textarea name="comments" class="formobject" id="comments" >TEST</textarea>
    Code (markup):
    The class 'formobject' is then assigned to all form objects.

    Hope this helps.
     
    Limotek, Jul 23, 2008 IP