How Can I Fix The Table Styling?

Some of the shortcodes in Restrict Content Pro add tables to your site, like the table on the "Your Membership" page:

But if your theme doesn't include any styling for tables, the display might look more like this:

Luckily a few quick lines of CSS can get things looking much cleaner!

If you're not sure how to add CSS to your theme, you can use a plugin like Simple Custom CSS or you can read up on how to create a child theme.

This line of CSS will do a lot towards getting the table looking presentable:

.rcp-table {
    width: 100%;
}

Or if you want things to look a bit more stylized, here's a larger snippet you can use:

.rcp-table {
    border-collapse: separate;
    border-spacing: 0;
    border-width: 1px 0 0 1px;
    margin: 0 0 1.75em;
    table-layout: fixed;
    width: 100%;
}

.rcp-table, .rcp-table th, .rcp-table td {
    border: 1px solid #d1d1d1;
}

.rcp-table th, .rcp-table td {
    padding: 5px;
}
Have more questions? Submit a request