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?
| SitePoint Sponsor |





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."


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}
www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge





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