• Resolved takane7

    (@takane7)


    I’m using TablePress version 1.7, Buttons Extension 1.0 and FixedHeader Extension 1.3. When I activate FixedHeader and add it on my table, it switches the positions of its thead and tbody so that their css doesn’t work well on Chrome browser. I added table border on the table, but then it disappears after the extensions are fully loaded. If I take off FixedHeader extension, everything works well. How can I fix this problem?
    Check out the problem: https://www.kwcattle.com/pdf-list-test

    https://www.ads-software.com/plugins/tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    I’m not really sure what you mean here. I just checked your link in Chrome and everything seems fine to me.
    Can you please explain in more detail what’s not working when the Extension is activated? Thanks!

    Regards,
    Tobias

    Thread Starter takane7

    (@takane7)

    Thanks for fast answer for my question. I added css for making border lines
    border: 1px solid #C6C6C6 !important;
    on the table but this does not work on Chrome. (Works on Firefox and IE) So I inspect the webpage, it says that the table’s thead tag and tbody tag are swapped. You know, thead tag have to be prior to tbody tag, but it was reversed so that border css does not work if I enable FixedHeader.

    https://drive.google.com/file/d/0B42ccFc6ve5Sdkw5ZnZFd09acjQ/view
    Before full load, This is what the table have to be shown.

    https://drive.google.com/file/d/0B42ccFc6ve5SVEMtMGJqajRidlU/view
    After full load, border lines in the table are disappeared.
    (Border lines have to be remained there)

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the explanation and the screenshots! Now I see what you mean!

    Unfortunately, I don’t really see why this is happening :-/ It indeed seems that Chrome interprets some CSS rules differently here, or that this maybe is a bug in Chrome.

    The order of the <thead> and <tbody> does not matter here. All browsers will interpret all orders. This is only important when checking the HTML validation. In the browser DOM, it does not matter. Thus, I’m pretty sure that this is not the reason.

    Note that (especially) vertical borders in tables are considered bad for readability and accessibility, so I’d actually remove those everywhere. The alternating row colors are totally sufficient here, to guide the reader’s eyes.

    Regards,
    Tobias

    Thread Starter takane7

    (@takane7)

    I fully agree with your opinion, but my client want the vertical borders…
    I may talk with him about this. Otherwise, I may have to find out how to switch <tbody> and <thead> because when I swap them manually on the browser’s built-in inspect tool, the disappeared border shown up.
    Anyway thanks very much to give me fast, long feedback!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    hhm, ok, I see. You should really talk to him and suggest to not use these borders. (Tell im my opinion, if you want ?? ).

    The disappeared borders probably show up, because switching <thead> and <tbody> does a full re-draw. The actual order does not matter. If you want to change that, you will probably have to modify the DataTables JS library or the FixedHeader JS script.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘FixedHeader plugin switches thead and tbody tags in the table’ is closed to new replies.