Title: Styling posts with CSS
Last modified: August 20, 2016

---

# Styling posts with CSS

 *  Resolved [bdd](https://wordpress.org/support/users/bws-online/)
 * (@bws-online)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/styling-posts-with-css/)
 * I’m trying to display posts from two different categories on the same page, and
   need to style the categories differently from one another.
 * The entries for the first category each have a thumbnail, a title (linked) and
   a description.
 * The entries for the second list each have a title (linked).
 * I saw in another post to use these in CSS to style the title, image, and listing:
   .
   display-posts-listing .title .display-posts-listing img .display-posts-listing
   li
 * That worked fine for the individual lists, but is there any way to handle the
   styling for two different lists (so they don’t both have to use the same CSS)?
 * Right now I have the first list set up, but then the second list is spaced out
   way too much (since there are no thumbnails).
 * Are there other classes to style as well? (Is there a reference for these somewhere?)
 * Thanks for the guidance/assistance.
 * [http://wordpress.org/extend/plugins/display-posts-shortcode/](http://wordpress.org/extend/plugins/display-posts-shortcode/)

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

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/styling-posts-with-css/#post-3227004)
 * The easiest thing to do would be to switch to HTML view and wrap your second 
   one in a div, like this:
 * <div class=”alternate-styling”>
 * [display-posts category=”xxx”]
 * </div>
 * Then you can use this CSS:
 * .alternate-styling .display-posts-listing .title
 *  Thread Starter [bdd](https://wordpress.org/support/users/bws-online/)
 * (@bws-online)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/styling-posts-with-css/#post-3227015)
 * Sounds good in theory, but it’s not working.
 * I feel like I must be missing something….
 * Are there default declarations for the CSS somewhere else that might be overwriting
   what I’m doing in my child theme style.css?
 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/styling-posts-with-css/#post-3227028)
 * Display Posts Shortcode comes with no CSS, so it’s up to your theme to provide
   it all. If you provide a link to your site I can see what’s not working.
 *  Thread Starter [bdd](https://wordpress.org/support/users/bws-online/)
 * (@bws-online)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/styling-posts-with-css/#post-3227061)
 * Thanks. As you’ve already marked this, we’ll consider it resolved at this point.

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

The topic ‘Styling posts with CSS’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [bdd](https://wordpress.org/support/users/bws-online/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/styling-posts-with-css/#post-3227061)
 * Status: resolved