Title: WordPress Table Styling
Last modified: November 30, 2022

---

# WordPress Table Styling

 *  [itsnathanham](https://wordpress.org/support/users/itsnathanham/)
 * (@itsnathanham)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-table-styling/)
 * I’d like to make some styling updates to the WordPress tables sitewide but I 
   can’t figure out how to get the CSS to work with my theme.
 * 1.) Set even and odd rows to alternating colors.
    Even: #ffffff Odd: #f3f3f3
 * 2.) Set the table border radius to 4px.
 * 3.) Style the header background to #555555.
 * 4.) Fix the mobile responsiveness problems on page today. Firstly, tables with
   many columns run outside the width of the content area. I’d also prefer to force
   side scroll.
 * For reference, the most relevant table example is found below the offer tiles
   on page in the H2 section named Comparing the best gaming monitors.
 * Note, I tried a few attempts in the style.css file to no avail.
 * Thanks in advance for your help!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-table-styling%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [willsonwanda](https://wordpress.org/support/users/willsonwanda/)
 * (@willsonwanda)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-table-styling/#post-16246725)
 * How To Style A WordPress Table Using CSS
    Table header styling. Table rows styling.
   Styling columns. Search bar alignment.
 *  Thread Starter [itsnathanham](https://wordpress.org/support/users/itsnathanham/)
 * (@itsnathanham)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-table-styling/#post-16248068)
 * Thx for your reply. Fwiw, I know much of the code to achieve the above I just
   can’t figure out the selector, I think it’s called. I’ve tried wp-table-block,.
   table, table, div.table, #table, etc. but it’s not working, using !important 
   or not on each item. Knowing how someone would code even just one of the items
   above sitewide would give me enough info to handle the rest.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-table-styling/#post-16249233)
 * Use your browser’s element inspector tool to see what selectors your theme is
   using. Use the same one’s to override theme styling. The override rules can be
   kept in the customizer’s Additional CSS section. Styles there will take precedence
   over equivalent rules in external files.
 * The table head isn’t using th tags, so you’d need to use the `:first-child` pseudo-
   selector. For odd/even rows, use `:nth-child(odd)` and similar for even. Place
   the first child head styling after the odd rule so it overrides the initial odd
   row. You might even need the !important modifier.

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

The topic ‘WordPress Table Styling’ is closed to new replies.

## Tags

 * [table](https://wordpress.org/support/topic-tag/table/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-table-styling/#post-16249233)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
