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

navbar pops off top of page in some situations #1726

Closed
matthewrobertson opened this issue Feb 4, 2012 · 1 comment
Closed

navbar pops off top of page in some situations #1726

matthewrobertson opened this issue Feb 4, 2012 · 1 comment

Comments

@matthewrobertson
Copy link

If you put a navbar on top of your page it says in the docs to add padding-top: 60px; to the body, this is fine, but it turns out that the order in which you do it is important. If you don't do it in between bootstrap and bootstrap responsive, the navbar will pop down from the top of the window when it is scaled down below a certain size.

This will work:

<link rel="stylesheet" type="text/css" href="/lib/bootstrap.min.css">
<style>
body {
    padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<link rel="stylesheet" type="text/css" href="/lib/bootstrap_responsive.css">

This will cause the bug:

<link rel="stylesheet" type="text/css" href="/lib/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/lib/bootstrap-responsive.css">
<style>
body {
    padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>

I don't know if this demands a fix per se but I think I should be more explicit in the docs.

@mdo
Copy link
Member

mdo commented Feb 13, 2012

Added a note to the docs in 2.0.1-wip. Thanks!

@mdo mdo closed this as completed Feb 13, 2012
mdo added a commit that referenced this issue Feb 13, 2012
smt pushed a commit to smt/sass-twitter-bootstrap that referenced this issue Aug 24, 2012
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

2 participants