Overview

On this page, we discuss a few typical ways that CSS and HTML can be used to style your Homepages and Site Homepages even further. We’ll typically discuss these with you after your initial Theme application.

HTML Banners

This banner is a piece of HTML, styled via CSS, which is available for you to use within an HTML Widget. By default, you’ll see 4 color variations of this banner on your Widget HTML homepage. These banners are optional, and do not need to be used. As with any widgets, they can only be edited by users who have the permission to edit Homepages (ie. Power Users).

How to add a banner to a homepage

Add a new widget to your homepage and select the “HTML Widget” option. On the ‘Configure Widget’ panel, select the “Source” option within the editing panel and paste the below code before hitting “Save”. You can then change the Heading and Paragraph text to your desired text.

<div class="category-banner">
<h1>Banner Title</h1>
<p>Lorem ipsum dolor sit amet consectetur adipscing elit. Phasellus luctus ante mauris</p>
</div>

Would you like a different style or color?

The style is controlled via the Theme, therefore the styling will be set up by us and we will consult with you. By default, we do set up three color options for you to utilize going forward that match the primary, secondary and tertiary options for the quick links. To set the color of the banner specifically, you can add is-primary, is-secondary or is-tertiary on to the div class name – i.e. class=”category-banner is-primary”.

Using the HTML Template feature

This refers to templates within an HTML Widget only (within Homepages and Site Homepages). For more information about templates within the Page Editor/Block Editor (when building your content pages) please see the Interact Community.

HTML templates are available within the HTML Widget, and can be managed via the Control Panel (find ‘Templates’). They are a good way to re-use pieces of HTML content easily. These templates are entirely optional.

You’ll see that we have a added a few pre-loaded HTML templates for you to use. Power Users are also free to create their own HTML templates, and utilise the Manage Custom CSS area of the Developer Framework to style their template.

Add your own CSS code

You are able to add your own custom CSS to your intranet, via the “Custom CSS” page within the “Developer Framework” section of the Control Panel. Our recommended use of the CSS area is to add styling to HTML content which you have added within a HTML Widget, the Homepage Header area or a Homepage Footer area. This way of working separates the code responsible for the look and feel from the code that adds the actual information on the page.

Note: We do have some ready-made examples of this type of content on the Widget HTML homepage on your intranet – namely our banners and icon buttons that we refer to as “Quick Links“. These may be sufficient for your needs before you consider creating your own HTML.

Please bear in mind that we recommend any classes and elements you create do not conflict with our existing HTML elements or attempt to re-style them, since these items use styles within the underlying theme that are hidden from view.

Similarly, and crucially, you should avoid trying to re-style generic classes such as container and row when creating HTML content. The product is based on a modified version of the Bootstrap framework, and targeting such generic class names could have unintended effects elsewhere in the product’s UI.

Using AI to generate CSS and HTML

AI tools are becoming increasingly useful when creating custom HTML content and widgets for your intranet. However, it is important to note that AI-generated code may introduce class names, font definitions or styles that conflict with the existing Interact product.

AI may also generate broad CSS selectors, such as body and html, or introduce its own fonts, colours, spacing and other visual styles. These can inadvertently affect other areas of your intranet or create a custom widget that looks inconsistent with your existing theme, even when the code itself functions correctly.

When using AI to create custom widgets, we recommend being clear in your prompts and asking AI to:

  • Avoid generic class names: Ensure any new classes are specific to your custom content and do not conflict with existing product classes. Avoid generic names such as row or container, and broad selectors such as body and html that could affect other areas of the platform.
  • Avoid unintended conflicts with existing styles: Do not unnecessarily redefine existing product styles, theme styles, variables or font settings when creating custom widgets. Where changes to existing styling are required, we strongly recommend contacting Interact Support.
  • Maintain visual consistency with your intranet: Custom HTML and ADK widgets may introduce their own fonts, colours, spacing or other styling that differs from your existing Interact theme. Even when the widget functions correctly, this can result in an inconsistent appearance. Where possible, aim to follow your intranet’s existing design conventions rather than introducing a separate visual style.
  • Review and test your code: If in doubt, check any AI-generated HTML and CSS on a duplicate homepage or using a test user, where possible. Pay particular attention to how your custom content appears across different screen sizes and within the surrounding page layout.

Tip: When prompting AI, explain that the code is for a custom Interact widget. Ask it to use unique class names, avoid broad CSS or Bootstrap selectors, avoid introducing new font styles or overriding existing font settings, and keep all styling specific to the content being created. You can also ask AI to follow your existing intranet’s visual style rather than introducing a completely new design.

Note: We recommend using the Custom CSS area to store your CSS rather than placing it directly inside each HTML widget’s source code. Custom JavaScript should also be added to the Masterpage JavaScript area rather than directly on the page.

Important considerations when using Custom CSS

We strongly advise against using the “Manage Custom CSS” page to try to alter the existing layout and appearance of our platform. Reasons for this include:

  • Potential inconsistent experience: Interact cannot take your custom code into account when testing new product releases. Therefore, your code may be affected or undone when a new Interact release is sent out. We will not be able to warn you of this beforehand.
  • Ongoing maintenance: Interact’s Support team can advise on a case-by-case basis but cannot maintain or ‘fix’ your code. If your code causes issues on your site, Interact can help to confirm this and would usually advise you to remove it.
  • Limited scope of control: Any custom CSS added will usually affect the web version of the Interact platform. It is typically unable to impact the Mobile App or any other channel, such as emails.
  • Potential impact on accessibility: The accessibility of your intranet may be impacted by any custom CSS you add. A user who navigates the intranet using a screen reader, for example, could be impacted if you use CSS to try to add, hide, change or re-order elements on a page.
  • Lack of translation: If content is added via CSS, such as using a pseudo-element, this text will not translate like other content on the intranet.

Finally, whilst we are happy to help where possible, it’s important to keep in mind that any code you add here is your own responsibility. We advise proceeding with caution when injecting your own code into our software.