css selectors help

Discussion in 'ASP .Net' started by rodchar, Jul 17, 2008.

  1. rodchar

    rodchar Guest

    hey all,
    can someone please show me how to select and the only the first cell of the
    first row

    i thought it would be something like:

    #tableId > tr > td

    thanks,
    rodchar
     
    rodchar, Jul 17, 2008
    #1
    1. Advertising

  2. rodchar

    bruce barker Guest

    ">" means any child (vs descendant), so it should select all td's under
    #tableId

    you probably want:

    #tableId + tr + td




    -- bruce (sqlwork.com)


    "rodchar" wrote:

    > hey all,
    > can someone please show me how to select and the only the first cell of the
    > first row
    >
    > i thought it would be something like:
    >
    > #tableId > tr > td
    >
    > thanks,
    > rodchar
     
    bruce barker, Jul 17, 2008
    #2
    1. Advertising

  3. rodchar

    CreativeMind Guest

    On Jul 17, 9:51 pm, rodchar <> wrote:
    > hey all,
    > can someone please show me how to select and the only the first cell of the
    > first row
    >
    > i thought it would be something like:
    >
    > #tableId > tr > td
    >
    > thanks,
    > rodchar


    give <tr> some id like < tr id="test"> and get its first child, your
    required td w'd be first or zeroth indexed child in case of IE and
    first or indexed 1 in case of Firefox.
     
    CreativeMind, Jul 18, 2008
    #3
  4. rodchar

    rodchar Guest

    am i doing something wrong, it doesn't seem to be working for me?

    http://pastebin.com/m3f51d80c


    "bruce barker" wrote:

    > ">" means any child (vs descendant), so it should select all td's under
    > #tableId
    >
    > you probably want:
    >
    > #tableId + tr + td
    >
    >
    >
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "rodchar" wrote:
    >
    > > hey all,
    > > can someone please show me how to select and the only the first cell of the
    > > first row
    > >
    > > i thought it would be something like:
    > >
    > > #tableId > tr > td
    > >
    > > thanks,
    > > rodchar
     
    rodchar, Jul 20, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Beckwith

    Class and ID Selectors (CSS question)

    Matt Beckwith, Jul 12, 2003, in forum: HTML
    Replies:
    3
    Views:
    396
    David Dorward
    Jul 13, 2003
  2. Derek Clarkson
    Replies:
    3
    Views:
    396
    Derek Clarkson
    Nov 7, 2003
  3. Nik Coughin

    css - descendant selectors

    Nik Coughin, Jan 28, 2004, in forum: HTML
    Replies:
    2
    Views:
    403
    Alliss
    Jan 29, 2004
  4. Jeanne D

    Question about CSS selectors

    Jeanne D, Oct 15, 2005, in forum: HTML
    Replies:
    8
    Views:
    395
    Jeanne D
    Oct 16, 2005
  5. Nathan Sokalski

    Help With CSS Selectors

    Nathan Sokalski, Mar 24, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    361
    Just Me
    Mar 24, 2008
Loading...

Share This Page