Formatting issue when using fixedheader with multiple rows

Formatting issue when using fixedheader with multiple rows

PeteDavisPeteDavis Posts: 2Questions: 2Answers: 0

Hope you can help with this. I'm using the fixedheader extension and all works well with a single row header.

I've added a second header row, above the row with the column headings and a colspan equal to the number of columns in the main table. It spans OK and all looks fine when the table header is displayed as normal. As I start to scroll and the header becomes fixed, both header rows are fixed ok but the row with the column headings adopts equal cell widths and loses the alignment with the main table columns.

Test case is at: https://race-results.info/test2018/T20171105test/?page=coursepage&courseid=1&day=1

Any help appreciated.

Pete

Answers

  • allanallan Posts: 61,722Questions: 1Answers: 10,108 Site admin

    Hi Pete,

    I've noticed this while debugging a page for another client as well. Interestingly if you swap the header rows around it will work perfectly. I've not been able to track down why the alignment goes weird when it is the "correct" way around - the sizing information is all identical. If it weren't for the fact that Firefox does the same thing I'd think it was a browser bug.

    The workaround I came up with was to have a third row with unique cells for each column at the top of the table, and the alignment is then correct. Use a bit of CSS to hide those spare cells.

    Its the oddest thing - sorry I don't have a better answer!

    Allan

This discussion has been closed.