• Resolved teoh89

    (@teoh89)


    Hi,

    I’m having issues with my table header not being left-aligned with my content.

    This can be seen for the column Type, Country and City.

    May I know what should I fix in my table?
    Thanks.

    • This topic was modified 8 years, 4 months ago by Jan Dembowski. Reason: Removed redundant link

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    To hopefully fix this, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress {
      table-layout: auto;
    }

    Regards,
    Tobias

    Thread Starter teoh89

    (@teoh89)

    HI Tobias,

    thanks for the prompt reply.

    I have put the above CSS code into the site, but it seems ok on desktop at first, but once I reduce the width of my browser to test the responsive view, it still doesn’t work after that.

    i tried on my mobile as well and it’s still not align.

    may I also know what is the difference of your above css code and if i were to use this code below?

    .tablepress-id-16 {
    width: auto;
    }

    • This reply was modified 8 years, 4 months ago by teoh89. Reason: sentence structure
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    the command that I posted changes the render mode of the table. This basically sets how the browser changes the column width as more data is loaded.
    Your command just says that the table should not stretch to 100% of the available width.

    Ok, instead of using the “Horizontal Scrolling” checkbox, could you please try the scroll mode of the TablePress Extension from https://tablepress.org/extensions/responsive-tables/ ? That also adds horizontal scrolling, but in a different technical way.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Header for Table not aligned with content’ is closed to new replies.