Title: Defining css classes for  a single wordpress page
Last modified: August 20, 2016

---

# Defining css classes for a single wordpress page

 *  Resolved [bikermanirl](https://wordpress.org/support/users/bikermanirl/)
 * (@bikermanirl)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/defining-css-classes-for-a-single-wordpress-page/)
 * I’m looking for a way to define how a single page will look in style.css.
 * A site I designed for a client has one page where the link style is different
   than the rest of the page and images have borders around them.
 * I did this by creating styles and applying them to the links and images.
 * The problem is that when the client is editing the page herself she wont have
   the technical ability to do that.
 * So I’m looking for a way of having them applied automatically
 * something like
    #SOMETHING-UNIQUE-TO-THAT-PAGE .img for example
 * Thanks

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/defining-css-classes-for-a-single-wordpress-page/#post-3516616)
 * does your theme use `body_class()` or `post_class()`
 * [http://codex.wordpress.org/Function_Reference/body_class](http://codex.wordpress.org/Function_Reference/body_class)
   
   [http://codex.wordpress.org/Function_Reference/post_class](http://codex.wordpress.org/Function_Reference/post_class)
 *  Thread Starter [bikermanirl](https://wordpress.org/support/users/bikermanirl/)
 * (@bikermanirl)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/defining-css-classes-for-a-single-wordpress-page/#post-3516635)
 * I normally make a child a theme from one of the default themes, usually twentyeleven
   and use pages instead of posts.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/defining-css-classes-for-a-single-wordpress-page/#post-3516636)
 * in this case, your theme has both body_class() and post_class() which gives you
   unique css classes for each page;
 * for static pages this is, among others, `.page-id-234` from body_class (as css
   class for the body tag), and `.post-234.page` from post_class (as css class for
   the post container)
 * try using a browser inspection tool (Firebug, or the ‘right-click’ – ‘inspect
   element’ of some browsers) to find out what css classes you have in your site.

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

The topic ‘Defining css classes for a single wordpress page’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/defining-css-classes-for-a-single-wordpress-page/#post-3516636)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
