css style on myspace

Discussion in 'CSS' started by lektrikpuke, Sep 21, 2007.

  1. #1
    Probably a stupid question, but I've seen on myspace layouts things like

    table table {declarations}
    table table table {dec's}
    table table table table {dec's}
    table, tr, td {dec's}

    I assume the 4 table declarations are for tables nested 4 deep? I've lightly googled this, but haven't seen an explanation. Is this correct formatting? Why do some lines have commas and others not? Are they classes? If so, why don't they start with a period? Just curious. :D
     
    lektrikpuke, Sep 21, 2007 IP
  2. Jamie18

    Jamie18 Peon

    Messages:
    201
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    table, tr, td {dec's} means that all tables, tr's and td's will have those styles applied...

    it's just shortform instead of writing

    table { dec's }
    tr { dec's }
    td { dec's }

    where they all have the same dec's..

    and i believe you're right.. when there are no commas the styles apply to the nested element.. i.e. table table { dec's } apply to a second level table but not the first

    check out http://www.cssbasics.com/
     
    Jamie18, Sep 21, 2007 IP