I have a question regarding the IE7
I want to make every column of my table has the same width no matter what contents they have
$("table").each(function(){
var column =0;
var totalWidth = $(this).width();
$('tr:nth-child(1) td',this).each(function(){
column ++;
})
var cellWidth = totalWidth / column;
$('td', this).css('width', cellWidth);
})
My codes work perfect on chrome and FF but not IE 7. I am not sure why. Can anyone help me about it? Thanks a lot!
Gallaghers:)var column = $('tr:first td',this).length;instead of looping and manually counting the columns