How to adjust the height of the top navigation bar and banner

You can’t do this normally, but can do so with CSS, but it really depends on what height you want. May I ask, what is the reason for this? Thanks.

The top navigation bar is too tall relative to the logo and avatar.

The banner height is also a bit too tall relative to the text height.

Could you provide me with the CSS code to modify these, if possible?

Hi there, which banner are you referring to? Thanks.

1 Like

I’ll take a guess is that “banner” means the header bar:
image

…which you should be able to change like this (choose your own height and units):

header.d-header {
  height: 50px;
}

And maybe “top navigation bar” is the topic menu:
image

…which you can change like this:

section.navigation-container {
  height: 40px;
}

Global Notice

If you inspect the global notice banner with browser devtools, you can see the div has an id and some classes:

image

It normally gets the padding, which affects the banner size, from the .alert class:

But you can override that just for the Global Notice, like this:

#global-notice-alert-global-notice {
  padding: .2em .5em .2em .5em;
}

image

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.