Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS table tr> td- does not give me the result I want

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35950
    chickentulip
    Member

    Hello everyone,
    I want to color the background of every first td in my table. using the code:

    table tr> td {
    background: lightgreen;
    }

    The code colors all tds in the table. Can someone explain why? and also help me to produce the code that I am after.

    My code is below

    
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    Project 1-2012















    Category



    Question





    #93928
    TheDoc
    Member

    I’m not really sure why this isn’t working. Instead, you could use first-child http://jsfiddle.net/3EdFL/

    #93931
    chickentulip
    Member

    Thank you all so much four your help!!!!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.