FixedHeader column widths are incorrect

FixedHeader column widths are incorrect

ariscrisariscris Posts: 2Questions: 0Answers: 0
edited June 2013 in FixedHeader
http://sidebysidecompare.info/, just click the Search button.
DataTables debugger code: asoneb

I see the problem in both Chrome and Safari. I haven't tried other browsers yet.
The problem also happens if I make the header the product name instead of the product photo.
"bAutoWidth":false didn't help.

Thanks for your help.

Aris

Replies

  • allanallan Posts: 61,446Questions: 1Answers: 10,055 Site admin
    Hi Aris,

    Thanks for the link. The first thing to suggest is to try using the FixedHeader nightly from the downloads page: http://datatables.net/download/ .

    However, I suspect its related to the images, since the sizes are currently being calculated before the images are all fully loaded. You could try calling the FixedHeader fnUpdate ( http://datatables.net/extras/fixedheader/api#fnUpdate ) on the window load event.

    Allan
  • ariscrisariscris Posts: 2Questions: 0Answers: 0
    Hi Allan,

    Wow, thanks so much for the quick and helpful response. I tried FixedHeader nightly and that didn't help. I tried calling fnUpdate() but that didn't help either. You're right about the issue being with the images though, because when I replaced them with just some text, it was fine. If I fix the image width rather than height, the column width issue goes away, though the page looks pretty silly because the source images are not consistent in height-width ratio. Do you know of a way to do the update after the image widths are known?

    Anyway, now my problem is with the heights of the row headers (FixedHeaders "left": true). I've updated http://sidebysidecompare.info (and removed the images) so you can see what I mean.

    Thanks again.

    Aris
This discussion has been closed.