SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,618
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    targeting a table?

    I kind of want to emphasize the latest post on my category page,
    http://fixmysite.us/gmpc/?cat=5
    So how can I target it with CSS so I can give it a different loo as all the other posts?
    "Oh, and Jenkins--apparently your mother died this morning."

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,283
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    HI,

    If you mean the very first post then that is quite awkward as you have no hooks to target easily. You could do it by structure but it's a bit of a fragile way to do it if the structure changes or is duplicated elsewhere.

    e.g.

    Code:
    table table:first-child .post{background:blue}

  3. #3
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,618
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that worked, I was trying to play with the adjacent selectors but think your way is better.
    "Oh, and Jenkins--apparently your mother died this morning."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •