Title: Custom CSS for Posts Pages Only
Last modified: October 5, 2018

---

# Custom CSS for Posts Pages Only

 *  [sbakerphr](https://wordpress.org/support/users/sbakerphr/)
 * (@sbakerphr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-posts-pages-only/)
 * Hello.
    I am hoping to change the width of my blog (and all posts on it) page
   only. I put the following code into custom css on my discoverypro theme and it
   gave the look I want but it changed the width for all pages and I don’t want 
   that. Can anyone help me single out just the blog pages/posts for this custom
   css?
 * #secondary {
    width: 32.9149%; } #primary { width: 65.9575%; } .entry-content{
 * float:left;
 * width:605px;
 * overflow: hidden;
    } h1 { font-size: 20px;
 *  font-size: 2.0rem;
 * }
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-css-for-posts-pages-only%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Amor](https://wordpress.org/support/users/amorfrancis/)
 * (@amorfrancis)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-posts-pages-only/#post-10751729)
 * Hi!
 * You can try this:
 * .blog #secondary,
    .single-post #secondary { width: 32.9149%; } .blog #primary,.
   single-post #primary { width: 65.9575%; } .blog .entry-content, .single-post .
   entry-content { float:left; width:605px; overflow: hidden; } .blog h1, .single-
   post h1 { font-size: 20px; font-size: 2.0rem; }
 * [@media](https://wordpress.org/support/users/media/) only screen and (max-width:
   800px){
    .blog #primary, .single-post #primary { width: 100% } }
 *  Thread Starter [sbakerphr](https://wordpress.org/support/users/sbakerphr/)
 * (@sbakerphr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-posts-pages-only/#post-10751815)
 * That worked perfectly. Thanks so much!

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

The topic ‘Custom CSS for Posts Pages Only’ is closed to new replies.

## Tags

 * [blog pages](https://wordpress.org/support/topic-tag/blog-pages/)
 * [width](https://wordpress.org/support/topic-tag/width/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [sbakerphr](https://wordpress.org/support/users/sbakerphr/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-posts-pages-only/#post-10751815)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
