# Dynamic styling

## Overview

Update the CSS of Odyssey UI elements using Odyssey's MessageChannel API. Simply provide a selector string to the desired element, accompanied by an array of styling changes to be applied. Using this powerful feature you can rebrand tooltips, move collaboration UI to different locations, change the mouse cursor, and customize the look and feel of Odyssey to however you like.

To apply custom styling, initiate a message with `type === "update-document-style"`. Include a data property with `elementSelector` specifying the target element by its string identifier. Additionally, provide a `styleUpdates` array, containing objects with both a `property` and `value` field. `property` defines the CSS property to modify and `value` indicates the desired styling value.

## Example payloads

### Update cursor

```json
{
  "type": "update-document-style",
  "data": {
    "elementSelector": "#player",
    "styleUpdates": [
      {"property": "cursor", "value": "pointer"},
    ]
  }
}
```

### Update button background and text color

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "type": "update-document-style",
  "data": {
    "elementSelector": ".app-button",
    "styleUpdates": [
      {"property": "background", "value": "#000000"},
      {"property": "color", "value": "#FFFFFF"},
    ]
  }
}
</code></pre>


---

# Agent Instructions: 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:

```
GET https://docs.odyssey.stream/embed-in-a-website/manage-your-stream/dynamic-styling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
