Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it intentional that static navbars now require an additional rule for width? #2565

Closed
thomas-mcdonald opened this issue Mar 13, 2012 · 3 comments

Comments

@thomas-mcdonald
Copy link
Member

From the changelog:

Updated .navbar .container to use width: auto; to start and then reset the fixed widths via the #gridSystem mixin (it's a little dirty, but required to avoid adding another class).

However, this means that when using a static navbar with the following code:

<div class="navbar">
  <div class="navbar-inner">
    <div class="container">
      ...
    </div>
  </div>
</div>

this means that the container takes width:auto, ignoring the 940px declaration on .container, and causing all navigation elements to sit at the far left/far right of the navigation.

Of course, this could be the expected behaviour, but it's a breaking change, and not particularly obvious as to the best way to remedy it. .navbar-inner > .container { width:940px; } works nicely, but I am confused as to why fixed navbars have containers with width, while static navbars have containers without width.

@oller
Copy link

oller commented Mar 13, 2012

I've encountered exactly the same issue. The 'width: auto' supercedes the fixed pixel width when the class .navbar-fixed-top is removed to make the navbar static.

@thomas-mcdonald
Copy link
Member Author

Dupe of #2548, my bad.

@sannefoltz
Copy link

(added a pull request to fix it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants