Css Stylesheets

Introduction

A css stylesheet is a textfile with information that controls the layout/formatting of an HTML webpage. The HTML file on the server has a link to the stylesheet, which must be on the server too, and when somebody opens your page his browser will read the stylesheet to get the layout information. That is all you need to know to use PalMate. If you want more detailed information read the Palview manual's chapter on cascading stylesheets.

PalMate copies the selected stylesheet to the target directory and all changes are written to this copy. The original is only changed if you choose to save the PalMate style.

Palview can use 4 different stylesheets:

Each and every stylesheet contains specific formatting/layout information for different purposes. A page stylesheet is automatically loaded when you select a PalMate style and is always used except for crosstable pages that has no links to game pages. A crosstable page (with or without links to game pages) uses a crosstable stylesheet and a page with I-frames can use a stylesheet to format the I-fame's background (optional).

Page Stylesheet

The page stylesheet is loaded and copied to the target directory when you select a PalMate style for your webpage. It is important to understand that the elements (selectors) are defined in a hierarchy - or a parent/child relationship so to speak. If for instance you define Arial as the preferred font for a "parent", all children (and children's children) will "inherit" Arial as the preferred font unless you specifically say that it should use another.

Crosstable Stylesheet

The crosstable stylesheet is only used for pages with a crosstable. If you load a PalMate style that was saved when you used crosstables, the crosstable stylesheet will be loaded automatically. If not you'll be prompted to select one.

I-frame Stylesheet

Optional and only used if you're making a page with I-frames. If used the I-frame stylesheet will usually only contain a BODY-tag to control the background of the I-frame. All other properties will be inherited from the page's stylesheet.

Magazine Stylesheet

The magazine stylesheet is more complex than the other stylesheets, because it also contains layout information for crosstables, indexes and more. Like the other stylesheets it only affects the stuff inserted by Palview.

Editing Stylesheets

When loaded the stylesheet's elements are visible in a treeview window and sorted so the parent/child relationship should be clear. It looks like this in the main window:

As you see the selected item is "Paragraphs with pgn moves". It is pretty high in the hierarchy - only the "BODY" selector is higher. It has quite a lot of "children": "Introduction text", "The actual moves of the game" etc. These children will inherit any properties assigned to "Paragraphs with pgn moves" unless you specifically assign other properties to the children (e.g. another text color).

The window "CSS Text Display" shows the item's current properties and how they will be written into the CSS stylesheet. If you look closely you'll see that it doesn't say "Paragraphs with pgn moves" - in the stylesheet this will be replaced by "DIV.pgm P". At the moment some fonts are defined (Georgia, Times New Roman and Serif). The margin is 10 points and there's no padding. This window is for information only - you cannot edit the text.

You can add, delete or change properties of the selected item from the menu Css Format. Properties are fonts, text, margin & padding, border and background.

In the small window "Fonts In Selected Order" are the selected fonts for the currently selected item. By using the up and down arrows you can change the order of priority or you can delete a font with the delete button.

Top
PalMate Help Index * PalMate Main Page * The Palview Home Page * En Passant Home