Custom styling for single pages
In some cases you might want to apply some custom styles for a single page on your site, but not to all of the pages. In this case you can use the unique body page ID class that WordPress generates and prepend the class to your CSS snippet.
In order to retrieve the body page ID class, you would have to inspect the code with your browser developer tools (like Firebug on Firefox or by viewing the page source). Here is an example of a body tag using this function:
On this example you can see the following classes added to the body:
– page : meaning that this is a page
– page-id-161 : the ID of the page is 161
– page-template-template-contact-php : the page uses the template file called template-contact.php
So, if for example, you would like to hide the logo on the page with ID 161, you can use the following CSS snippet:
.page-id-161 #logo-container{ display:none; }