Title: traitadmin's Replies | WordPress.org

---

# traitadmin

  [  ](https://wordpress.org/support/users/traitadmin/)

 *   [Profile](https://wordpress.org/support/users/traitadmin/)
 *   [Topics Started](https://wordpress.org/support/users/traitadmin/topics/)
 *   [Replies Created](https://wordpress.org/support/users/traitadmin/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/traitadmin/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/traitadmin/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/traitadmin/engagements/)
 *   [Favorites](https://wordpress.org/support/users/traitadmin/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [CSS file and page templates](https://wordpress.org/support/topic/css-file-and-page-templates/)
 *  [traitadmin](https://wordpress.org/support/users/traitadmin/)
 * (@traitadmin)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/css-file-and-page-templates/#post-878201)
 * Here’s an easy way to style the pages separately.
 * You are going to give each page it’s own <body> id by replacing the body tag 
   in the ‘header.php’ file of whatever template you are using.
 * Currently, the body tag of your header most likely looks like this:
 * <body<?php if ( is_home() ) { ?> id=”home”<?php } ?>>
 * You are going to replace the old one with something that looks like this:
 * <body <?php if (is_home()) { ?> id=”home”<?php } elseif (is_page(‘about’)) { ?
   > id=”about” <?php } elseif (is_page(‘contact’)) { ?> id=”contact” <?php } ?>
   >
 * Just replace ‘about’ and ‘contact’ with the titles of your own pages.
 * Now you can specify the different attributes of your various elements depending
   upon the id of the body.
 * Example
 * #home .nav {border-top:#ffffff;}
    #about .nav {border-top:#000000;}
 * Hope this helps!

Viewing 1 replies (of 1 total)