S
S
sacrancy2015-01-15 09:12:24
css
sacrancy, 2015-01-15 09:12:24

The Container is positioned below the header in Bootstrap. How to fix?

I ran into a problem with layout. I made a fixed header, after it I create a container-fluid, but it appears not below the header, but at the very top, that is, under it. Same issue with normal fixed div. I'm new to layout and I can't find an answer on how to wrap around so that the element appears below the fixed header. I will be grateful for help.
The code:

<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
        <!-- DROPDOWN BEGIN -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-toggle"></span>
            <span class="icon-toggle"></span>
            <span class="icon-toggle"></span>
          </button>
          <a href="#" class="navbar-brand">Brand</a>
        </div>
        <!-- DROPDOWN END -->
        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li class="active"><a href="#">0</a></li>
            <li><a href="#">1</a></li>
            <li><a href="#">2счёта</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
          </ul>
        </div>
      </div>
    </nav>
                <div class="container-fluid">  <!-- С этим блоком начинаются проблемы в позиционировании -->
      <div class="row">
        <div class="col-lg-12 bilboard-background">
          <h2>test</h2>
        </div>
      </div>
    </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-01-15
@thewind

Clue. Container is displayed below the header, because the latter is anchored to the top of the page and resp. has the required position style for this. Find which class for nav adds such a property and remove it. Or add a top padding for the container. Can you?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question