Viewing 7 replies - 1 through 7 (of 7 total)
  • Give your table a unique name (xxxxx) and change the column width for that table via css.

    #xxxxx > tbody > tr > td { width: 25%; }

    Should work. (Each column gets 25% of the parent width)
    You can enter the css style in the table options.

    Thread Starter findlay62

    (@findlay62)

    Tried that in extra css classes as follows

    #newsfeeds> tbody > tr > td { width: 25%; }

    Received error message saying the code was invalid

    Any idea what has gone wrong – the name of the table is Newsfeeds.

    Thanks

    Derek

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Derek,

    thanks for your question, and sorry for the trouble.
    The idea that Stefan suggests is pretty much correct, we’ll just have to tweak the CSS code. As TablePress tables already have a CSS class, we also won’t need to add an “Extra CSS class”. Instead, just add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-10 td {
      width: 25%;
    }

    Regards,
    Tobias

    Thread Starter findlay62

    (@findlay62)

    Tobias,

    Thank you. I’ve tried that but table still looks the same. You can see at the bottom of page here howdoidate.com

    I tried clearing the cache too locally and on my CDN but still the same.

    Any further ideas?

    Thanks

    Derek

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Derek,

    the problem is this other “Custom CSS” that you have:

    .tablepress .column-1 {
    	width: 80px;
    }
    
    .tablepress .column-2 {
    	width: 80px;
    }
    
    .tablepress .column-3 {
    	width: 80px;
    }
    
    .tablepress .column-4 {
    	width: 80px;
    }

    That basically tells the columns to have a different width than the 25% again, and as it uses two class selectors, it gets a higher precedence. Also, as it uses the .tablepress class, it applies to all tables at the same time, which is not really a good idea.
    Can you therefore please try again after removing that CSS?

    Regards,
    Tobias

    Thread Starter findlay62

    (@findlay62)

    Hi Tobias. I’m delighted to report all 4 columns are now the same width thanks tp your good self. Your service is as usual outstanding and I’m very grateful to you.

    Best wishes

    Derek

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Derek,

    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 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Column Widths’ is closed to new replies.