• Resolved treyg

    (@treyg)


    Tobias,

    I love this plugin and your support! I have tried the CSS code that you’ve recommended to others (below) to center the text in the table head row, but for some reason it’s not responding for me. Any suggestions?

    .tablepress thead th {
      text-align: center;
    }

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

    Here’s a link for you to check out

    http://swfs.wpengine.com/browse-degrees-table-test/

    Thanks!

    • This topic was modified 8 years, 10 months ago by stephencottontail.
    • This topic was modified 8 years, 10 months ago by bdbrown.
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.

    This is caused by some CSS in your theme, due to which we’ll have to use some slightly different CSS code.
    Please try again with

    .main-content .tablepress-id-10 thead th {
      text-align: center;
    }

    As a side note: As you have turned off the individual JavaScript features like sorting, searching, and pagination, I recommend to also uncheck the “Use DataTables” checkbox on that table’s “Edit” screen.

    Regards,
    Tobias

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    you are using too many CSS selectors in the wrong way there. If at all,

    @media (max-width: 400px) {
      .main-content .tablepress-id-10 {
        width: 350px !important;
      }
    }

    should be sufficient.

    Regards,
    Tobias

    Thread Starter treyg

    (@treyg)

    Tobias,

    Thank you for your quick response! It worked perfectly! I have one more question, if you don’t mind taking a look.

    I’m using the Responsive Tables extension and we have collapse style on this form. I’m trying to set the width of the table so that I can see the first column header. My code isn’t working. Do you mind pointing me in the right direction?

    @media (max-width: 400px) {
    	.main-content .tablepress .tablepress-id-10 dataTable no-footer dtr-inline collapsed {
    		width: 350px !important;
    	}
    }

    The link I sent the other day should still work. Any help will be greatly appreciated!

    Thanks so much!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Can’t Center Table Head Text’ is closed to new replies.