Sign In
Start Page | Recent Changes | All Pages | Orphan Pages | Junebug Help

How To Make Page Level CSS Elegant

Page Level CSS is contained inside the <head> tags of an XHTML page.

Step One

Add the following to a [Layouts|layout], such as the Normal one, inside the <head> tags:


 <r:if_content part="styles"><style type="text/css">
 <!--
 <r:content part="styles"/>
 -->
 </style></r:if_content>

Note: If you have multiple (X)HTML layouts, you will need to include the above in each one.

Step Two

Create a Page Part named ‘styles’ for pages that with custom CSS (like the homepage) and place the CSS rules in there.

If no page part named ‘styles’ exists, then the page does now show any signs of this because of the <r:if_content> tags! :-)


Version 1 | Other versions: newer » current versions
Page last edited by roydongb on July 06, 2008 12:52 PM