If I understand your situation correctly, you might be looking for :nth-child()

You could, for example, get the 2nd cell of each row this way:
$('td:nth-child(2)').css('textAlign', 'center');

Remember that nth-child() is the only jQuery selector that is 1- based, because it's based solely on the CSS spec.

Cheers,

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 7, 2007, at 9:10 PM, pd wrote:


Hello

I've looked up

http://docs.jquery.com/Selectors

and alas I can't determine if there is a way to select the x td of all
rows of a table.

The use case is that i have a table for a forum and I'd like to center
text-align the 'Topics' and 'Replies' totals columns.

Thanks
pd


Reply via email to