Use CSS in Template Code
You can use CSS as local styles using the style attribute directly on any HTML element in a template. For example:
You can also use the class attribute to refer to CSS classes defined in external CSS stylesheets. You must include <link> elements in the template to link to any external CSS stylesheets.
External CSS stylesheets used in templates must either:
Have a fully-qualified URL where the stylesheet is hosted. For example:
<div>
<link type="text/css" rel="stylesheet"
href="http://www.jackbe.com/prestodocs/v3.0/prestodocs.css"/>
<div
>
<div
>View Title</div>
...
</div>
</div>
Generally, you should use this option for external stylesheets hosted by third parties or custom stylesheets for your organization that are hosted outside of Business Analytics. Hosting custom stylesheets for your organization in the Business Analytics or Business Analytics Hub web applications is not recommended as this complicates deployment and upgrade migrations.
Have been uploaded to
Business Analytics and use a
Business Analytics URL.
This option is recommended for custom stylesheets for your organization or from third-parties when they cannot be hosted outside of Business Analytics or these resources should be available for use in any custom view.
Note: | External resources can only be uploaded to Business Analytics by Business Analytics administrators. |
This example links to a stylesheet that has been uploaded to Business Analytics. The full path for this URL is defined when the resource is uploaded, but is generally in the form http:app-server:port/mashzone/files/filename:
<div>
<link type="text/css" rel="stylesheet"
href="http://localhost:8080/mashzone/files/myView.css"/>
<div
>
...
</div>
</div>