Title: Commented Out CSS Code
Last modified: May 19, 2020

---

# Commented Out CSS Code

 *  Resolved [blgorman](https://wordpress.org/support/users/blgorman/)
 * (@blgorman)
 * [6 years ago](https://wordpress.org/support/topic/commented-out-css-code/)
 * I wanted to check and see if my CSS was causing an error in my table, so I put
   a /* to comment it out. I saved, went to check on my table, turns out the CSS
   wasn’t responsible for the issue (which is not what I’m seeking help for), and
   went back to my CSS. It was gone! I guess it decided that all my CSS was invalid
   because it was commented out and stripped it. Very frustrating.
 * 1. Is there any way to get it back?
    2. Can this be changed so one could comment
   things out and not have them be removed? 3. If I’m wrong and commenting things
   out normally works and my CSS could have disappeared for some other reason, let
   me know.
 * Thanks!

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years ago](https://wordpress.org/support/topic/commented-out-css-code/#post-12860828)
 * Hi,
 * thanks for your post, and sorry for the trouble, especially as you experienced
   data loss, at it looks like 🙁 This is obviously never what I want.
 * Unfortunately, I have no real idea why this happened, and don’t know a way to
   get the CSS code back — unless you have a local backup, e.g. to a downloaded 
   file, or unless your site is still available in e.g. the Google cache or the 
   Internet Archive’s Wayback Machine. In that case, they might have a copy of the
   CSS file that maybe could be retrieved.
 * Now, commenting out CSS code in the TablePress “Custom CSS” is no problem, normally.
   I’m doing it regularly on my sites as well. It’s just important to not break 
   the structure of the CSS (e.g. by then accidentally nesting the `{` and `}`).
   However, that shouldn’t really happen if you use the proper comment syntax, like
 *     ```
       /* This code makes the text red. Also a command for bold font-weight is commented out. */
       .tablepress tbody td {
         color: #ff0000;
         /* font-weight: bold; */
       }
       ```
   
 * This example has two common comment scenarios, an explaining comment at the top,
   and commenting out a single CSS property, which is then not used.
    Note how the
   comments also have an ending `*/`. You don’t mention using that in your post,
   but only the `/*` at the beginning. Did you maybe not include the `*/` to end
   the comment?
 * Regards,
    Tobias
 *  Thread Starter [blgorman](https://wordpress.org/support/users/blgorman/)
 * (@blgorman)
 * [6 years ago](https://wordpress.org/support/topic/commented-out-css-code/#post-12860882)
 * You’re exactly right – I didn’t include the */ (didn’t think it was necessary
   as I was commenting out the entire thing). My mistake!
 * It’s not tooo much code, so it won’t take terribly long to rewrite it. Thanks
   for your helpful feedback. Sounds like it was an error on my part and not on 
   yours. I’ll go ahead and rate TablePress!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years ago](https://wordpress.org/support/topic/commented-out-css-code/#post-12860892)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias

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

The topic ‘Commented Out CSS Code’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/commented-out-css-code/#post-12860892)
 * Status: resolved