Title: Edit paragraph CSS without altering post excerpts
Last modified: November 13, 2021

---

# Edit paragraph CSS without altering post excerpts

 *  Resolved [ahmedcheema](https://wordpress.org/support/users/ahmedcheema/)
 * (@ahmedcheema)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/edit-paragraph-css-without-altering-post-excerpts/)
 * I’d like to format my paragraphs on articles in a certain way by changing the
   margins and font sizes.
 * I can do so like this:
 *     ```
       p{
       font-size: 20px;
       padding-right: 20%;
       padding-bottom: 10px;
       padding-left: 20%;
       }
       ```
   
 * The problem is that this will also effect the excerpts you see below posts on
   the home page and category pages. I don’t want that to happen.
 * One solution is to use classes like this:
 *     ```
       p.SomeClass{
       font-size: 20px;
       padding-right: 20%;
       padding-bottom: 10px;
       padding-left: 20%;
       }
       ```
   
 * I could then apply the class manually to every paragraph in every post on the
   website. This is my last resort option because of how many pages I’d have to 
   go back to, so I was wondering if there was another way to separately edit post
   and excerpt paragraph CSS
    -  This topic was modified 4 years, 7 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Developing with WordPress
      topic

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

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/edit-paragraph-css-without-altering-post-excerpts/#post-15064052)
 * > I was wondering if there was another way to separately edit post and excerpt
   > paragraph CSS
 * That should be easy.
 * If the site in question is the one in your profile, then the following selector
   should work, as the `entry-content` class should only be generated on **_individual_**
   blog posts/pages, and not on archive-type pages where excerpts are often shown.
 *     ```
       .entry-content p {
   
       /* Your custom style goes here */ 
   
       }
       ```
   
 * And as a bonus, if you wanted to style the **_excerpts_** separately, you’d use
   something like:
 *     ```
       .entry-summary p {
   
       /* Your custom style goes here */
   
       }
       ```
   
 * I hope that helps.
 *  Thread Starter [ahmedcheema](https://wordpress.org/support/users/ahmedcheema/)
 * (@ahmedcheema)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/edit-paragraph-css-without-altering-post-excerpts/#post-15064061)
 * Super helpful, thanks!

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

The topic ‘Edit paragraph CSS without altering post excerpts’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [ahmedcheema](https://wordpress.org/support/users/ahmedcheema/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/edit-paragraph-css-without-altering-post-excerpts/#post-15064061)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
