views:

35

answers:

0

Hi,

Following problem:

I'm having a table with 3 columns and I'm using jQuery to set the column widths by code, like:

var tr = $("tr",myTable).eq(0);
var cells = $("td",tr);
cells.eq(0).width(100);
cells.eq(1).width(150);
cells.eq(2).width(300);

Works nice under Firefox, but IE8 acts very strange: The 2nd column shows up on screen with a column width of 99px, although, when alerting the column width with jQuery, it still tells 100 :/ Even more strange: when setting the column width to 101, it shows up with +2 pixels (102) instead of just +1 .. anyone know whats wrong?

BTW. when putting a div inside each cell which given column width, it works under IE8 (but isn't the proper solution) - so I assume it to be a bug.

Any ideas?

Thanks.