• Resolved lucacapi

    (@lucacapi)


    Goodmorning,
    I have a problem with my table:

    http://lucacapiluppi.com/la-stanza-dei-giochi/
    I tried to change the firs column width with this code:

    .tablepress-id-N .column-2 {
    width: 100px;
    }

    adding the right table ID and column number, but it doesn’t work.
    How can I fix it?

    And also I need to change the background color of some column just in the body, is there a way to do that?

    Thank you
    Luca

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.

    Are you trying to increase or decrease the width here? Decreasing will not work, unfortunately, but increasing should work with this CSS:

    .tablepress-id-5 .column-1 {
    	font-weight: bold;
    	width: 150px;
    	min-width: 150px;
    }

    (The extra min-width command is necessary because the table is already wider than the screen and therefore scrolling.)

    To change the background of a column, but only in the table body, you can use

    .tablepress-id-5 tbody .column-4 {
      background-color: #ff0000;
    }

    Regards,
    Tobias

    Thread Starter lucacapi

    (@lucacapi)

    Thank you so much!
    This is exactly what I needed.
    Best

    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 3 replies - 1 through 3 (of 3 total)

The topic ‘column width doesn’t change’ is closed to new replies.