CityDesk 2.0-Documentation
Using Cascading Style SheetsThe 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"></head>
<!--
BODY {font-family: Georgia, Times, serif;
font-size: 80%;}
STRONG {font-family: Verdana, sans-serif;
font-weight: bold;}
-->
</style>
<body>
<p>{$.body$}</p>
</body>
</html>
Here we have provided styles to override the built in BODY and STRONG HTML elements:
By providing a font style for BODY, all the paragraphs of text inside the body will inherit that style. Because CityDesk always uses the <STRONG> tag when users make text bold, you can override this in the style sheet to use a different format for bold text. For example, the design of your site might look better if bold text wasautomatically purple!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.©Copyright 2001-2003 Fog Creek Software, Inc. All Rights Reserved.