Title: Adding table border
Last modified: February 22, 2020

---

# Adding table border

 *  Resolved [dianalo](https://wordpress.org/support/users/dianalo/)
 * (@dianalo)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-table-border/)
 * Hi there, how do I add a border to the table I have within the Online Training
   section of the page? I’m already using a table block, and while editing, a border
   is displayed. But the live version of the table does not have one, making it 
   confusing to read.
 * The current start of the HTML is:
    <figure class=”wp-block-table aligncenter”
   ><table class=””><tbody><tr><td class=”has-text-align-center” data-align=”center”
   > **Who**</td> etc etc
 * I am not currently using any widgets/plugins.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-table-border%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-table-border/#post-12466950)
 * You can add CSS in the Customizer > Additional CSS option.
    To affect all tables,
   you would code an outside border like: `table {border: 1px solid}` which would
   use whatever the current text color is set to. Or you can put the color, if you
   want. To affect only that table, you need to select it in the editor and then
   in the sidebar, open the Advanced section and add the class name. For a class
   name `example`, the CSS would be `.example {border: 1px solid}` Note the leading
   dot, which indicates a class.
 * To put the border on each cell, you would use `td` instead of `table`, or to 
   make it only this table, `.example td`.
 *  Thread Starter [dianalo](https://wordpress.org/support/users/dianalo/)
 * (@dianalo)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-table-border/#post-12475355)
 * Hi [@joyously](https://wordpress.org/support/users/joyously/), thanks for your
   response! I was able to figure out the first part where you mention outlining
   all tables on the website, but I’m not following how to outline just the table
   on the page I’ve linked. I think I’m getting confused with the class name and
   how that comes into play.
 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-table-border/#post-12475404)
 * If that’s the only table on that page, you can use one of the page-specific classes
   on the `<body>` tag of that page. You can find these classes by using your browser
   Developer tools when you are viewing the page.
    Or you can select the table in
   the editor and use the Advanced option in the sidebar to add a class to the table.
   Either way, you would add your CSS as I said before, using a leading dot on the
   class name. For the body class, it looks like `.page-id-170 table {border: 1px
   solid}` and for the table with a class like `.example {border: 1px solid}`
 *  Thread Starter [dianalo](https://wordpress.org/support/users/dianalo/)
 * (@dianalo)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-table-border/#post-12475728)
 * OH I see, you need to first identify the CSS code with Appearances, then on the
   page/block itself you’d list the class used in the aforementioned code. Thank
   you [@joyously](https://wordpress.org/support/users/joyously/)!

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

The topic ‘Adding table border’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [dianalo](https://wordpress.org/support/users/dianalo/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/adding-table-border/#post-12475728)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
