How to keep Announcement Banner always visible on Jira Data Center


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

As an admin, I may want to keep the Announcement Banner always visible to emphasize which environment users are working on or to ensure links available on the Banner are handy regardless of how far the user has scrolled down.

This is the desired behavior:

Environment

Any Jira Data Center version

Solution

This is the reference documentation on how to add/update the Announcement Banner:

The following block of code can be added to the end of the Announcement Banner code to ensure it doesn't disappear when you scroll down:

<!-- Custom CSS to make the Announcement Banner sticky on all pages. -->
<style>
#announcement-banner {
  position: sticky;
  top: 0px;
  z-index: 3;
  background-color: var(--aui-body-background, #F4F5F7);
}
</style>

The aui-body-background is added to inherit the value from Jira and it provided a default value if it fails to obtain it. You may also add your own color code directly by replacing var(--aui-body-background, #F4F5F7) with the code.

Depending on any current code you may already have on your Announcement Banner, you may need to merge the code or reposition it according to the priority of the customization elements.

You must test it on a Staging/Test environment first to ensure you do not render your instance unusable!

Keep this article handy in case you need to remove it directly from the database:

Remove the Jira Server / Data Center announcement banner through the database

This page has several Best Practices and disclaimers related to customizing Jira's CSS:

Last modified on Sep 24, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.