Skip to content

navigation bar is misplaced when the window gets smaller

Solved Customisation
23 3 6.8k 1
  • I have the same things for the navbar when I have a lot of icons on the left.

    the solution I found is to move the icons of the navbar to the left to have more room when you click on the search button and no longer have this rather annoying phenomenon

    /*left*/
    @media (min-width: 768px) {
    .container-fluid>.navbar-collapse, .container-fluid>.navbar-header, .container>.navbar-collapse, .container>.navbar-header {
        margin-right: 0;
        margin-left: -40px;
    }
    }
    
    /*right*/
    @media (min-width: 768px) {
    .navbar-right {
        float: right!important;
        margin-right: -45px;
    }
    }
    
  • @phenomlab additionally, “mark all read” option at the bottom of the notification panel looks completely white and not visible, FYI…

    Screen Shot 2022-06-19 at 1.10.13 PM.png

    @crazycells said in navigation bar is misplaced when the window gets smaller:

    @phenomlab additionally, “mark all read” option at the bottom of the notification panel looks completely white and not visible, FYI…

    Screen Shot 2022-06-19 at 1.10.13 PM.png

    This has been fixed 🙂

  • Hi @phenomlab ,

    when I shrink the window, the navigation menu items are misplaced and overlap with the topic title.

    Screen Shot 2022-06-18 at 9.30.29 PM.png

    @crazycells said in navigation bar is misplaced when the window gets smaller:

    Hi @phenomlab ,

    when I shrink the window, the navigation menu items are misplaced and overlap with the topic title.

    Screen Shot 2022-06-18 at 9.30.29 PM.png

    This should also be fixed. In fact, a much cleaner way to do this is to remove the float on the navbar class

    @media (min-width: 992px) and (max-width: 1199px) {
    .navbar-nav {
        float: none;
        margin: 0;
    }
    }
    
  • phenomlabundefined phenomlab has marked this topic as solved on
  • @crazycells said in navigation bar is misplaced when the window gets smaller:

    @phenomlab additionally, “mark all read” option at the bottom of the notification panel looks completely white and not visible, FYI…

    Screen Shot 2022-06-19 at 1.10.13 PM.png

    This has been fixed 🙂

    @phenomlab I think the bug is still there, when I shrink the window or when I click the search button, the navigation bar icons are still overlapping with the title.

    Screen Shot 2022-06-22 at 1.02.35 PM.png

  • additionally, the bookmark function is working but it is not filling the heart button… I think it should turn to a dark heart from a light heart to indicate that it is bookmarked… this is how I can see the difference.

    Screen Shot 2022-06-22 at 12.59.50 PM.png

  • @phenomlab I think the bug is still there, when I shrink the window or when I click the search button, the navigation bar icons are still overlapping with the title.

    Screen Shot 2022-06-22 at 1.02.35 PM.png

    @crazycells What screen size is this ? The removal of float happens at 992px

  • additionally, the bookmark function is working but it is not filling the heart button… I think it should turn to a dark heart from a light heart to indicate that it is bookmarked… this is how I can see the difference.

    Screen Shot 2022-06-22 at 12.59.50 PM.png

    @crazycells said in navigation bar is misplaced when the window gets smaller:

    additionally, the bookmark function is working but it is not filling the heart button… I think it should turn to a dark heart from a light heart to indicate that it is bookmarked… this is how I can see the difference.

    Screen Shot 2022-06-22 at 12.59.50 PM.png

    fixed ❤

    bd79eee8-804b-45e6-95f4-c9e5efd5b265-image.png

  • @crazycells What screen size is this ? The removal of float happens at 992px

    @phenomlab said in navigation bar is misplaced when the window gets smaller:

    @crazycells What screen size is this ? The removal of float happens at 992px

    from ~787 to ~1000 px …

    below ~787 px , it goes to the mobile view…

  • @phenomlab said in navigation bar is misplaced when the window gets smaller:

    @crazycells What screen size is this ? The removal of float happens at 992px

    from ~787 to ~1000 px …

    below ~787 px , it goes to the mobile view…

    @crazycells I’ll have another look at this.

  • phenomlabundefined phenomlab has marked this topic as unsolved on
  • @crazycells this should be resolved now. I’ve had to adjust the breakpoints in Bootstrap (version 3 which NodeBB uses) to accommodate this, and it’ll fire at anything below 1199px (1000 just looks odd…)

    Here’s the modified CSS in case you want it

    @media (max-width: 1199px) {
      .navbar-header {
          float: none;
      }
      .navbar-left,.navbar-right {
          float: none !important;
      }
      .navbar-toggle {
          display: block;
      }
      .navbar-collapse {
          border-top: 1px solid transparent;
          box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
      }
      .navbar-fixed-top {
          top: 0;
          border-width: 0 0 1px;
      }
      .navbar-collapse.collapse {
          display: none!important;
      }
      .navbar-nav {
          float: none!important;
          margin-top: 7.5px;
      }
      .navbar-nav>li {
          float: none;
      }
      .navbar-nav>li>a {
          padding-top: 10px;
          padding-bottom: 10px;
      }
      .collapse.in{
          display:block !important;
      }
      div#nav-dropdown {
        display: none;
    }
     .visible-xs-block, .visible-xs-inline, .visible-xs-inline-block {
        display: initial !important;
    }
    .container-fluid>.navbar-collapse, .container-fluid>.navbar-header, .container>.navbar-collapse, .container>.navbar-header {
        margin-right: -15px !important;
        margin-left: -15px !important;
    }
    .account .cover {
        background-size: auto;
        background-color: var(--breadcrumb);
        height: 150px;
    }
    .account .cover .avatar-wrapper {
        top: 80px;
        margin-top: 39px !important;
    }
    }
    

    Note that there may be other elements that will require adjustment.

    Try it out and let me know, but I think this resolves the problem.

    NOTE: I’m using var in CSS, so you may want to either remove this line, or replace it with something else

    background-color: var(--breadcrumb);
    
  • phenomlabundefined phenomlab has marked this topic as solved on
  • I have the same things for the navbar when I have a lot of icons on the left.

    the solution I found is to move the icons of the navbar to the left to have more room when you click on the search button and no longer have this rather annoying phenomenon

    /*left*/
    @media (min-width: 768px) {
    .container-fluid>.navbar-collapse, .container-fluid>.navbar-header, .container>.navbar-collapse, .container>.navbar-header {
        margin-right: 0;
        margin-left: -40px;
    }
    }
    
    /*right*/
    @media (min-width: 768px) {
    .navbar-right {
        float: right!important;
        margin-right: -45px;
    }
    }
    

    @DownPW said in navigation bar is misplaced when the window gets smaller:

    the solution I found is to move the icons of the navbar to the left to have more room when you click on the search button

    I think perhaps the solution I posted is more elegant - that way, you don’t have to worry about elements shifting when you resize - just a thought 🙂

  • I always have the same problem when I click on the search button with your code. So I keep mine and add yours for the problem of window redimmension 🙂

  • I always have the same problem when I click on the search button with your code. So I keep mine and add yours for the problem of window redimmension 🙂

    @DownPW sounds good.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • External Links - New Window

    Solved Customisation nodebb links settings
    8
    2 Votes
    8 Posts
    1k Views
    @Sampo2910 search the forum here for ogproxy which is the client side version of that plugin I wrote. It’s in use here on this forum.
  • navigation menu panel on mobile

    Solved Customisation nodebb css
    8
    1
    7 Votes
    8 Posts
    2k Views
    @crazycells hmm. That’s odd. I haven’t made any changes from recollection but I could be wrong. I’ll need to check. EDIT - very strange. I honestly don’t recall adding the below CSS block to alter the bottom bar, but you’re right… .bottombar-nav { padding: 0px !important; } I’ve removed this so it reflects stock Harmony.
  • Bug Report

    Solved Bugs nodebb bugs
    47
    1
    26 Votes
    47 Posts
    15k Views
    @crazycells Good points, thanks. I completely forgot that classes are added - makes life much simpler! EDIT - seems this is pretty straightforward, and only needs the below CSS .upvoted i { color: var(--bs-user-level) !important; } This then yields [image: 1718028529465-3f072f8a-ebfa-4910-8723-73c493b8e4eb-image.png] However, the caveat here is that the .upvoted class will only show for your upvotes, and nobody else’s. However, this does satisfy the original request however I would love to see my upvoted posts more clearly, because currently, when I upvote, nothing on the post tool is changing, it would be nicer if there is an indication that I have upvoted (like a filled or colored triangle?)
  • Issues with Progress Bar on v3

    Solved Customisation
    48
    1
    14 Votes
    48 Posts
    15k Views
    @Panda You could use the below .page-topic .pagination-block.ready { display: none; }
  • Footer bar add center text

    Solved Customisation css
    41
    1
    8 Votes
    41 Posts
    15k Views
    @phenomlab said in Footer bar add center text: div#console-nav-tab Ah ok test with bottom: 0px !important; idem
  • help me to get rid of my old CDN

    Moved Customisation stackpath cdn
    13
    2 Votes
    13 Posts
    3k Views
    @Hari Ok. Good. Thanks
  • FIXED: Annoying cosmetic bug on mobile view

    Moved Bugs bugs
    13
    3 Votes
    13 Posts
    3k Views
    And now, after all this time I finally discovered that the CSS I previously referenced was for something else - and used the same CSS name, so I’ve had to reinstate this block .tab-content { max-height: 0; padding: 0 2em; color: #898989; background: #eeeeee; transition: all 0.35s; margin-top: -5px; } And, add this below to make it more specific. .emoji-tabs .tab-content { height: 100%; max-height: 100%; padding: 0; margin: 0; }
  • Reading Meter Progress bar

    Locked Solved Customisation css
    15
    1
    9 Votes
    15 Posts
    5k Views
    For anyone else following this thread, please see https://sudonix.com/topic/467/issues-with-progress-bar-on-v3