• Resolved geo222

    (@geo222)


    The tables always span across my entire page and I don’t want that. I want the table to adjust itself to the content.

    I’ve tried to set the column widths this way and it doesn’t work:

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

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

    .tablepress-id-1 .column-3 {
    width: 50px;
    }

    .tablepress-id-1 .column-4 {
    width: 50px;
    }

    I’ve also tried fiddling around with the padding but it only affected it vertically, not horizontally so I gave up on it.

    .tablepress-id-1 .column-1 {
    padding: 4px;
    }

    .tablepress-id-1 .column-2 {
    padding: 4px;
    }

    .tablepress-id-1 .column-3 {
    padding: 4px;
    }

    .tablepress-id-1 .column-4 {
    padding: 4px;
    }

    What am I doing wrong?

    Here is my table:

    https://www.learn-english-now.whytecrow.com/wp/lessons/beginner-lessons/numbers-1-100/

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Besides the column having a width, the actual HTML <table> element also has a width (100% of the content area), so that will also have to be changed. For that, please try this “Custom CSS”:

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

    (With that, you could even remove the other CSS that you posted.)

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Table and Column Width’ is closed to new replies.