I set the navbar to fixed top with .container - body is centered but narbar persists with .container-fluid. See attached image.

I'm a newb and tried to look up if similar open issues exist but couldn't find any. Sorry if dup.

Thanks for your help!

CommentFileSizeAuthor
fluid container navbar.jpg102.6 KBEvangelo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Evangelo created an issue. See original summary.

markhalliwell’s picture

Version: 8.x-3.0-beta2 » 8.x-3.x-dev
Component: CSS Overrides » Documentation
Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Did you rebuild the caches?

Evangelo’s picture

Yes, I already Flushed All Caches. Not sure if it helps that I added the header code here below for page.html.twig - much appreciate your help.

Also, I am using 8.x-3.0-Bata 2, not 8.x-3.x-Dev - thanks

#}
{% set container = theme.settings.fluid_container ? 'container-fluid' : 'container' %}
{# Navbar #}
{% if page.navigation %}
  {% block navbar %}
    {%
      set navbar_classes = [
        'navbar',
        theme.settings.navbar_inverse ? 'navbar-inverse' : 'navbar-default',
        theme.settings.navbar_position ? 'navbar-' ~ theme.settings.navbar_position|clean_class : container,
      ]
    %}
    <header{{ navbar_attributes.addClass(navbar_classes) }} id="navbar" role="banner">
      <div class="navbar-header">
        {{ page.navigation }}
        {# .btn-navbar is used as the toggle for collapsed navbar content #}
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="sr-only">{{ 'Toggle navigation'|t }}</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
      </div>

      {# Navigation (collapsible) #}
      {% if page.navigation_collapsible %}
        <div class="navbar-collapse collapse">
          {{ page.navigation_collapsible }}
        </div>
      {% endif %}
    </header>
  {% endblock %}
{% endif %}


Evangelo’s picture

Version: 8.x-3.x-dev » 8.x-3.0-beta2
markhalliwell’s picture

Version: 8.x-3.0-beta2 » 8.x-3.x-dev
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I cannot reproduce this whatsoever with the latest code (dev). I can't fixed released versions (if it's really a bug in beta2, I haven't tested).

Evangelo’s picture

Thanks for your time and for looking at it. I've love bootstrap and used it a number of times without any problems. I've even used Alpha ver on a drupal 8 install without any prob but in a prod environment. This drupal 8 install was though cpanel by my hosting provider and the only thing I did before installing dootstrap theme/sub-theme was to upgrade the core to 8.0.2. I'll just use the navbar in normal position.

wranvaud’s picture

Not sure if it's the same issue but my fixed navbar looked very similar as your screenshot but I had no .container class on it at all.

What I did was adding a template with the .container class at THEMENAME/templates/system/region--navigation-collapsible.html.twig with this code (copied from region.html.twig and modified):

{%
  set classes = [
    'region',
    'container',
    'region-' ~ region|clean_class,
  ]
%}
{% if content %}
  <div{{ attributes.addClass(classes) }}>
    {{ content }}
  </div>
{% endif %}