Fog Creek Software
Fog Creek Software

CityDesk 2.0-Documentation
Using Cascading Style Sheets

The best way to control the formatting of text inside your articles is to use Cascading Style Sheets (CSS). This is an feature of HTML that is available in all modern web browsers. (To learn more about CSS, visit http://www.w3.org/Style/CSS).

Cascading style sheets allow you to control the appearance of your HTML pages precisely. In CityDesk, the easiest way to use CSS is to put a <style> tag into your template. Here is a sample template that uses CSS, with the style sheet section shaded:

<html>
<head>
<title>{$ .headline $}</title>

<style type="text/css">
<!--
BODY    {font-family: Georgia, Times, serif;
         font-size: 80%;}
STRONG  {font-family: Verdana, sans-serif;
         font-weight: bold;}
-->
</style>
</head>
<body>
<p>{$.body$}</p>
</body>
</html>

Here we have provided styles to override the built in BODY and STRONG HTML elements:

You may also want to provide styles for EM (italicized text), U (underlined), or even BLOCKQUOTE (indented text). Because the style sheet is a part of the template, not a part of each article, the formatting will only appear when you publish the site, not while you are editing the articles.

CityDesk Documentation -  Home


©Copyright 2001-2003 Fog Creek Software, Inc. All Rights Reserved.