Title: Custom CSS for a .post-content
Last modified: April 14, 2020

---

# Custom CSS for a .post-content

 *  [keepearthpretty](https://wordpress.org/support/users/keepearthpretty/)
 * (@keepearthpretty)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/custom-css-for-a-post-content/)
 * Hi – I added a custom css to my blog page section because I want to get rid of
   a stylized first-child:first-letter property. Here’s my code:
 *     ```
       .post-content > p:first-child:first-letter {
           float: left;
           margin: 0px 0px 0 0;
           font-family: Open Sans;
           font-size: 15px;
           line-height: 28px;
           color: #696969;
           text-align: center;
       }
   
       This is the original code that keeps popping up when I inspect the page:
       .post-content > p:first-child:first-letter {
           float: left;
           margin: 0px 12px 0 0;
           font-size: 80px;
           line-height: 65px;
           text-align: center;
       }
       ```
   
 * When I’m looking at it through the customize mode it reflects my new code; however,
   when I view the page as preview it doesn’t reflect my code (it’s what you see
   with that link)
 * Not sure how to get rid of that original unwanted code. Please help, I’ve been
   stuck on this for a few days now.
    -  This topic was modified 6 years, 1 month ago by [keepearthpretty](https://wordpress.org/support/users/keepearthpretty/).
    -  This topic was modified 6 years, 1 month ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-css-for-a-post-content%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [M Media](https://wordpress.org/support/users/mmediagroup/)
 * (@mmediagroup)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/custom-css-for-a-post-content/#post-12672015)
 * Hey [@keepearthpretty](https://wordpress.org/support/users/keepearthpretty/)!
 * Great question! While it is generally not recommended, try adding `!important`
   to your properties and see if that overwrites it, like so: `color: #696969 !important;`.
 * The issue comes down to CSS specificity, you can read about it more here (it’s
   a little technical though): [https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)
 * Let us know if it helps.
 * Warm regards!
 *  Thread Starter [keepearthpretty](https://wordpress.org/support/users/keepearthpretty/)
 * (@keepearthpretty)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/custom-css-for-a-post-content/#post-12709632)
 * Thanks, [@mmediagroup](https://wordpress.org/support/users/mmediagroup/)! I’ll
   try that and check out the link you shared 🙂

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

The topic ‘Custom CSS for a .post-content’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [keepearthpretty](https://wordpress.org/support/users/keepearthpretty/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/custom-css-for-a-post-content/#post-12709632)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
