• Resolved John C

    (@jcweb35)


    I am very frustrated in my attempt to change the table width of my table. I have searched the forum, and have put the following changes in my custom css:

    .tablepress th,
    .tablepress td {
    width: auto;
    }

    .tablepress-id-1 {
    width: 50%;
    margin: 0 auto 1em;
    }

    However, they seem to have no effect. I’m able to change font attributes, but cannot do anything with the table, or column widths. I suspect the theme is getting in the way so I’ve also put the same code in the custom css file for the theme also without effect.

    The offending page is: http://okyorkrite.org/?page_id=274

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.

    Indeed, the widths and padding of your tables is mostly set by your theme. To work around that, we’ll have to slightly modify the used CSS selectors, by prepending #content. Please try again with

    #content .tablepress {
        width: auto;
    }
    #content .tablepress th,
    #content .tablepress td {
        padding: 8px;
    }

    Regards,
    Tobias

    Thread Starter John C

    (@jcweb35)

    Thank you very much.

    That worked perfectly!

    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 ‘Cannot change tablepress table width’ is closed to new replies.