Elegant Page Level CSS

radiant edited this page Aug 24, 2010 · 2 revisions
Clone this wiki locally

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

Step One

Add the following to a layout, such as the Normal one, inside the

tags:
<r:if_content part="styles">
<style>
  <!--
  <r:content part="styles"/>
  -->
</style>
</r:if_content>

Note: If you have multiple 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 not show any signs of this because of the <r:if_content> tags! :-)