Question

I've created my own .subnav-fixed (like in Twitter's Bootstrap docs, css):

@media (min-width: 980px) {
  .subnav-fixed {
    background-image: url(pic146x120.png);
    height: 146px;
    width: 120px;    
    position: fixed;
    top: 0px;
    left: 0;
    right: 0;
    z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */
  }
}

and I try to position that in the same way as other elements are positioned:

<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <div class="row offset1 span6">
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">

          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <a class="brand" href="index.html">Project</a>
        <div class="nav-collapse">
          <ul class="nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#contact">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>
  </div>
  <div class="row">
    <div class="subnav-fixed offset1 span6">
      test test test test test test test test test test test test test test test 
    </div> 
  </div>
</div>

With such code (offset1 span6) I expect that my .subnav-fixed would be at the same position from the left, where brand is. But actually it is not so - demo.

Was it helpful?

Solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top