• Resolved mf255201

    (@mf255201)


    I searched here and found out how to center the text within my rows and columns, but I don’t see anything that shows me how to center the title of my table.

    Also, is there an easy way to add grid lines to separate the rows and columns, similar to what you would see with a spreadsheet? If so, what CSS code would I add to control how bold these lines appear?

    I love this plug-in so far; it’s going to do exactly what I need it to. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Usually, to center the title, some CSS like

    .tablepress-table-name {
      text-align: center;
    }

    is sufficient. You can add that to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress.

    For adding border lines, you can use something like

    .tablepress-id-123 th,
    .tablepress-id-123 td {
      border: 1px solid #ff0000;
    }

    (The 123 is the table ID that would need to be adjusted.)

    Regards,
    Tobias

    Thread Starter mf255201

    (@mf255201)

    Thank you so much for your quick reply. Those both worked.

    For the border, what would I add to the code to make vertical and horizontal lines to separate the cells?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    could you clarify this a bit? What do you mean by “separate”? Doesn’t that CSS code add a border line between the cells?

    Regards,
    Tobias

    Thread Starter mf255201

    (@mf255201)

    It looks like that adds the border line horizontally between rows. I was originally looking for one that adds vertical lines in between the columns as well, but now I think that I like it how it is with just the horizontal lines.

    Thanks.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, this adds border lines for both rows and columns. I would also recommend using only horizontal borders. This makes tables better readable.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Center Table Header and Make Grid Lines’ is closed to new replies.