• Resolved Tim Burkart

    (@bigmoxy)


    Hi Tobias,

    I having an issue with this table. Column 1 contains images and I am using CSS to set their width to 125px. Despite that the table display shows a very wide column 1. It seems that the class dtr-control controls the width. I would like column 1 be the width of the image, column 2 to be approximately 1/2 of the display width and column 3 to fill the remaining space.

    Can you help me with the column widths for this table?

    Thank you!

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Please try setting a column width here, by adding this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-2 .column-1 {
      width: 125px;
    }

    Regards,
    Tobias

    Thread Starter Tim Burkart

    (@bigmoxy)

    Thank you for the quick response! I added the CSS but do not see any change.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok, one more try:

    .tablepress-id-2 .column-1 {
      width: 125px !important;
    }

    If that does not help either, my assumption is that the wide width is caused by the images actually being inserted with a wider width in the HTML <img> tag (i.e. <img width="320" height="67" ... > for example). Due to the use “lazy loading” the browser might be taking these values when trying to determine the column width. Thus, you might have to adjust (or remove) these values in the <img> HTML tags.

    Regards,
    Tobias

    Thread Starter Tim Burkart

    (@bigmoxy)

    Adding !important helps. Unfortunately my caching plugin, WP-Rocket is automatically adding the image dimensions. I did not add them. I will followup with them.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Why is column 1 so wide?’ is closed to new replies.