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.

Div Background color??????????????

Discussion in 'CSS' started by ghyper.com, Jul 15, 2010.

  1. #1
    Please let me know how can I add BLACKbackground color with WHITE text in this div without disturbing class. because its used at so many places..

    <div class="news">
     
    ghyper.com, Jul 15, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    use inline style elements.

    <div class="news" style=background:#000; color:#fff" >
     
    radiant_luv, Jul 15, 2010 IP
  3. ghyper.com

    ghyper.com Peon

    Messages:
    809
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks u so much :)
     
    ghyper.com, Jul 15, 2010 IP
  4. pdjsolutions

    pdjsolutions Peon

    Messages:
    66
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just to be more precise, he missed a " after the style= and also, use background-color

    It should be:

    <div class="news" style="background-color:#000; color:#fff" >

    Prateek
     
    pdjsolutions, Jul 15, 2010 IP