Title: Style Sheet Coding
Last modified: August 20, 2016

---

# Style Sheet Coding

 *  [moeryan18](https://wordpress.org/support/users/moeryan18/)
 * (@moeryan18)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/style-sheet-coding/)
 * Hi Everyone,
 * I am creating a website where I want the index page to be designed differently
   than the secondary pages. How do I separate the CSS code for the index page from
   the rest of the CSS code? Do I just separate it out with comments?
 * Sorry, I am just not sure how to organize the coding.
 * Thanks for your time!

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

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/style-sheet-coding/#post-3236110)
 * Add the [body_class()](http://codex.wordpress.org/Function_Reference/body_class)
   function within your `<body>` HTML element.
 * You can then identify pages with their page id classes.
 *  Thread Starter [moeryan18](https://wordpress.org/support/users/moeryan18/)
 * (@moeryan18)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/style-sheet-coding/#post-3236111)
 * Great, thank you. I know it’s a really basic question, but it’s my first website
   I’m trying to do with WordPress and I’m basically styling/designing from scratch.
 * Much appreaciated!
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [13 years, 6 months ago](https://wordpress.org/support/topic/style-sheet-coding/#post-3236112)
 * One way of doing it would be creating two different stylesheets and loading them
   through a conditional test. Not sure if you are PHP savvy but that is one way.
   Using comments is also another way of separating the code and is a great way 
   of documenting why you did what you did for future reference.
 *  Thread Starter [moeryan18](https://wordpress.org/support/users/moeryan18/)
 * (@moeryan18)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/style-sheet-coding/#post-3236118)
 * Hi Jose,
 * No I’m not very PHP savvy, only slightly familiar…thanks for the tip though, 
   I will maybe learn in the future. Thanks again!

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

The topic ‘Style Sheet Coding’ is closed to new replies.

## Tags

 * [Coding](https://wordpress.org/support/topic-tag/coding/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [index](https://wordpress.org/support/topic-tag/index/)
 * [organize](https://wordpress.org/support/topic-tag/organize/)
 * [secondary](https://wordpress.org/support/topic-tag/secondary/)

 * 4 replies
 * 3 participants
 * Last reply from: [moeryan18](https://wordpress.org/support/users/moeryan18/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/style-sheet-coding/#post-3236118)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
