Pin Announcement Bar on Source

Is it possible to pin the announcement bar on Source? Looking for script to add to code injection is so. :sunglasses:

This way is simple:

Basically fixed the bar to the top (default is 48px in height) then just push the nav area down by the same 48px (may need to adjust if you had a bigger bar)

This also handles it should you disable the announcement bar at some other point, or if only enabled for a subset of members or not members.

<style>
body:has(#announcement-bar-root) {
  .gh-announcement-bar {
    position: fixed!important;
    top: 0;
    width: 100%;
    z-index:100;}
  .gh-navigation {
    margin-top: 48px;}
  }
</style>

No doubt there may be cleaner ways @Cathy_Sarisky is way more a genious bar than I am here ;)

1 Like

Thank you that works a treat.

I have a lot to learn … and am keen to.

I appreciate your time responding. ;)

1 Like