0

I've created a navbar using Bootstrap using this . The problem is when I scroll the page and the navbar goes to top because the page jumps in down in the content! Un How can I resolve it?

If you try to a little scroll from here, the page jumps under "Content"

5
  • I assume you mean your sidebar and navbar are not synced? update the code that sets the affix or the navbar to include the selector for the sidebar. ie this updated Bootply $('#nav, #sidebar').affix(...) Commented Mar 9, 2017 at 1:52
  • Where is your code? Commented Mar 9, 2017 at 1:54
  • @haxxxton Sorry, I was referring to the content Commented Mar 9, 2017 at 2:00
  • I am not sure what you're referring to then, the content scrolls nicely for me. Could you explain with pictures or try to describe what you're experiencing further please Commented Mar 9, 2017 at 2:13
  • @haxxxton look the edit Commented Mar 9, 2017 at 2:32

1 Answer 1

1

I'm guessing you mean that when #nav is fixed to the top, the first bit of the "content" section gets hidden behind it? In that case the quickest fix I can think of would be to put some padding to the top of the content section.

.content {
  padding-top: 50px;
  }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.