# Edit Your Widget or Microsite HTML and CSS for Advocate

You can customize your Advocate widgets and microsite with additional HTML and CSS to better align with your brand’s look and feel. Using Advocate’s built-in HTML editor, you can add structure, styling, and even override certain default components for deeper customization.

{% hint style="info" %}
**Note**: Custom HTML/CSS editing is only available to specific Advocate editions. Contact [support](mailto:saasquatch-support@impact.com) to upgrade your account and access this feature.
{% endhint %}

#### Why use custom HTML or CSS?

Custom HTML and inline CSS allow you to:

* Match your company’s brand guidelines more closely
* Reformat layout and spacing
* Apply styles beyond what’s available in the default editor
* Override select widget or microsite component styling

{% hint style="warning" %}
**Important**: Our support team provides limited assistance for issues introduced by custom code. If you’re unsure, we recommend working with your Advocate Implementation or post-launch team.
{% endhint %}

#### Edit the HTML or CSS

{% tabs %}
{% tab title="Edit your microsite" %}
You can edit the HTML or CSS to make further customizations to your microsite using the built-in HTML editor. While the HTML editor allows for additional flexibility in microsite design, keep in mind that we are unable to troubleshoot any adjustments made with custom HTML or CSS.

1. In the left navigation menu, select ![\[Engage\] v2](https://paligoapp-cdn-eu1.s3.eu-west-1.amazonaws.com/impact/attachments/f01cdffa431a4d75ff09c130b66974d4-aa671735ec2b65af79961eaf59ab60af.svg) **\[Engage] → Content**.
2. On the microsite card, select **Edit content**.
3. In the Microsite tab, select the layout or page whose code you want to edit.
4. Select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-3364b389815e6386c73528dda541e583d2fe0c16%2F0eceeaaa32f185a9932075cd699744ed6b755396902ea2e4cabff73869cb9f6f.svg?alt=media)![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6104f36947b882897acb25b42d057dee1ebd572a%2F80d3875a58861553d70eb3df7d72c3e6820128c3d4212b3bb623e44832b6ee2c.svg?alt=media) **\[Code view]** in the top menu bar.
5. Add or modify HTML and CSS as needed.
6. CSS can be added in three ways:

   * By importing an external CSS stylesheet
   * At the top of the page in a `<style>` tag:

   ```programlisting
   <style>
     p {
       color: blue;
     }

     .exampleClass {
       color: green;
       font-size: 25px;
       text-align: center;
     }

     #exampleId {
       color: red;
       font-size: 30px;
     }
   </style> 
   ```

   * Inline, to apply a style to a specific HTML element:

   ```programlisting
   <h3 style="font-size:30px;color:blue;">Get rewarded when your friend uses our product</h3> 
   ```
7. Select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-1782d05738c13ec58eb6efb9c77d0c3e5ac96f02%2F309574593b8707c978ca25cd69a36a5a0faa4589103874c5ddc1dd96307e696e.svg?alt=media) **\[Paintbrush]** to preview your updates.
8. Select **Save Draft** to save, or **Publish** to push changes live.
   {% endtab %}

{% tab title="Edit your widget" %}
You can edit the HTML or CSS to make further customizations to your widget using the built-in HTML editor. While the HTML editor allows for additional flexibility in widget design, keep in mind that we are unable to troubleshoot any adjustments made with custom HTML or CSS.

1. In the left navigation menu, select ![\[Engage\] v2](https://paligoapp-cdn-eu1.s3.eu-west-1.amazonaws.com/impact/attachments/f01cdffa431a4d75ff09c130b66974d4-aa671735ec2b65af79961eaf59ab60af.svg) **\[Engage] → Content**.
2. On the *Widgets* card, select **Edit Widget**.
3. Under *Program Widgets*, select the widget you want to edit.

<div data-with-frame="true"><figure><img src="https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-a43ec359ba16080d17bc57dc7faaa602268158cf%2Fdfb3191356adad2577e4a1e24b0646a647f8e08aa012feb467a38841a9b5a788.png?alt=media" alt=""><figcaption></figcaption></figure></div>

1. In the top menu bar, select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-3364b389815e6386c73528dda541e583d2fe0c16%2F0eceeaaa32f185a9932075cd699744ed6b755396902ea2e4cabff73869cb9f6f.svg?alt=media)![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6104f36947b882897acb25b42d057dee1ebd572a%2F80d3875a58861553d70eb3df7d72c3e6820128c3d4212b3bb623e44832b6ee2c.svg?alt=media) **\[Brackets]**.
2. Add or edit your HTML in the body of the page.
3. CSS can be added in three ways:

   * By importing an external CSS stylesheet
   * At the top of the page in a `<style>` tag:

   ```programlisting
   <style>
     p {
       color: blue;
     }

     .exampleClass {
       color: green;
       font-size: 25px;
       text-align: center;
     }

     #exampleId {
       color: red;
       font-size: 30px;
     }
   </style> 
   ```

   * Inline, to apply a style to a specific HTML element:

   ```programlisting
   <h3 style="font-size:30px;color:blue;">Get rewarded when your friend uses our product</h3> 
   ```
4. Select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-1782d05738c13ec58eb6efb9c77d0c3e5ac96f02%2F309574593b8707c978ca25cd69a36a5a0faa4589103874c5ddc1dd96307e696e.svg?alt=media) **\[Paintbrush]** to preview your updates.
5. Select **Save Draft** to save, or **Publish** to push changes live.
   {% endtab %}
   {% endtabs %}

#### **Edit Components Using CSS Parts**

Some built-in components in your widget or microsite can’t be fully styled through the visual editor. In certain cases, you can override their appearance using CSS parts, which allow for more granular control.

If you’re looking to make advanced style updates, the impact.com team can advise on what’s possible and share any relevant CSS part selectors. If you’re interested in editing components with CSS parts, reach out to your Advocate Implementation or post-launch support team.
