1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to add a background colour to an Input type in a form

Discussion in 'CSS' started by misohoni, Nov 7, 2004.

  1. #1
    at the moment all boxes have a white background:

    <input type="text" id="dates" name="date" size="10" />

    How do I add a background colour and even change the font type?

    Thanks
     
    misohoni, Nov 7, 2004 IP
  2. reh3363

    reh3363 Guest

    Messages:
    147
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you should be able to use:

    style="background: #fc0; font-family: Georgia;"

    I think that works if I remember correctly
     
    reh3363, Nov 7, 2004 IP
    jeremyhowell likes this.
  3. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #3
    thanks, I worked it out it links to input...
     
    misohoni, Nov 7, 2004 IP
  4. jatrasmara

    jatrasmara Peon

    Messages:
    416
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <input type="text" id="dates" name="date" size="10" style="background-color:#00FF00" />
    :)
     
    jatrasmara, Jan 26, 2011 IP
  5. jeremyhowell

    jeremyhowell Member

    Messages:
    379
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    45
    #5
    jatrasmara, did you not notice before you posted that this thread is almost 7 years old?
     
    jeremyhowell, Jan 26, 2011 IP
  6. steelfrog

    steelfrog Peon

    Messages:
    537
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Wow. You'd figure they'd lock threads older than a certain amount of time to prevent this.
     
    steelfrog, Jan 27, 2011 IP
  7. jeremyhowell

    jeremyhowell Member

    Messages:
    379
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    45
    #7
    They probably will lock this one now but it is sad that it has to come to that, you would think that it would only be common sense that if the thread is older than a week and the OP has clearly already solved their problem, you wouldn't post in it?
     
    jeremyhowell, Jan 27, 2011 IP
  8. calvin4u

    calvin4u Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This property will let you add a background color behind most anything. You can add it to text like this:

    <SPAN style="background-color:yellow">My background is yellow!</SPAN>

    And you get a beautiful yellow background..
     
    calvin4u, Jan 27, 2011 IP