> For the complete documentation index, see [llms.txt](https://docs.cw.crisisworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cw.crisisworks.com/security-and-support/technical-reference/merge-template-reference/css-reference.md).

# CSS Reference

For users with web development experience, the following contains the built-in rules, along with the default additional CSS rules. These rules can be inserted into into your HTML editor during local development.

## Base CSS (built-in)

The Base CSS is built into each page **and cannot be changed**.

While the CSS itself cannot be changed, you can:

* Adjust the variables at the top — these align to settings available in the merge template form.
* Override the CSS using [Additional CSS](#additional-css)

```css
/* Variables */
:root {
    /* overall page dimensions */
    --firstPageTopMargin: 10mm;
    --firstPageBottomMargin: 10mm;
    --pageTopMargin: 10mm;
    --pageBottomMargin: 10mm;
    --height: 297mm;
    --mediaPrintTopMargin: 20mm !important; /* page header */
    --mediaPrintBottomMargin: 20mm !important; /* page footer */

    /* to set a background, use url(https://path/to/your/background.png) */
    --letterheadFile: none; 

    /* margins for the letter content */
    --topMargin: 20mm;
    --leftMargin: 0mm;
    --rightMargin: 0mm;

    /* address positioning from top left of page */
    --addressLeft: 20mm;
    --addressTop: 80mm;
}
```

```css
/* The base CSS rules */
@page:first {
    size: A4;
    margin-top: var(--firstPageTopMargin)mm;
    margin-left: 0mm;
    margin-right: 0mm;
    margin-bottom: var(--firstPageBottomMargin)mm;
}
@page {
    size: A4;
    margin-top: var(--pageTopMargin)mm;
    margin-left: 0mm;
    margin-right: 0mm;
    margin-bottom: var(--pageBottomMargin)mm;
}

@media print {
    html, body {
        width: 210mm;
        height: var(--height); /* only set if defined */
        margin-top: var(--mediaPrintTopMargin);
        margin-left: 0mm;
        margin-right: 0mm;
        margin-bottom: var(--mediaPrintBottomMargin);
    }
}

body {
    background: white;
    background-image: var(--letterheadFile);
    background-size: 210mm var(--height);
    background-repeat: no-repeat;
    font-family: 'Signika', sans-serif;
    font-size: 12pt;
}

hr {
    color: white;
    height: 0px;
    border: none;
    page-break-after: always;
    clear: both;
}

img.media {
    float: left;
    width: 46%;
    padding: 0px 10px 10px;
}

img.signature {
    width: 50mm;
    float: none;
    padding: 0px 10px 10px;
}

article {
    margin-top: var(--topMargin); /* only applies to first page */
    margin-left: var(--leftMargin);
    margin-right: var(--rightMargin);
}

address {
    left: var(--addressLeft);
    top: var(--addressTop);
    position: absolute;
    font-style: normal;
}

table td {
    vertical-align: top;
    text-align: left;
}

img {
    padding: 4mm;
}

br {
    clear: both;
}
```

## Additional CSS (customisable)

The Additional CSS is user-configurable. The following is a good starting point, which provides the classes used in this guide.

{% hint style="success" %}
This CSS is automatically included for new templates. You can adjust this to suit your needs.
{% endhint %}

```css
/* Set the default font for the document - everything is relative to this. */
body {
    font-size: 11pt !important;
    font-family: arial, helvetica, sans-serif;
}

/* Define the headings relative to the default font */
h1 {
    font-size: 125%;
    font-weight: bold;
}

h2 {
    font-size: 100%;
    font-weight: bold;
}

h3 {
    font-size: 80%;
    font-weight: bold;
    font-variant: small-caps;
}


/* Create left and right anchored text boxes */
.left-box {
    float: left;
    width: 49%;
}

.right-box {
    float: right;
    width: 49%;
}

/* Here's a big, red, important box for an important message */
.warning-box {
    border: 1px solid #ff0000;
    color: #ff0000;
    background-color: #ffcaca;
    padding: 4mm;
}

/* Create left, right, center and justify text styles */
.left-text {
    text-align: left;
}

.right-text {
    text-align: right;
}

.center-text {
    text-align: center;
}

.justify-text {
    text-align: justify;
}

/* Text for fine-print - can be wrapped multiple times */
.small-text {
    font-size: 85%;
}

/* Big, red warning text */
.warning-text {
    color: #ff0000;
    font-weight: bold;
}

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cw.crisisworks.com/security-and-support/technical-reference/merge-template-reference/css-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
