Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9209147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:46:25+00:00 2026-06-18T00:46:25+00:00

I have been trying to position sidenav using answers from this question . Currently

  • 0

I have been trying to position sidenav using answers from this question. Currently I’m able to fix the menu position to the page simply by:

<div style="position: fixed" ..>
  ..
</div>

or by adding this to the corresponding css rule. It works ok but the position start right after the jumbotron subhead and stays there when I scroll. I want it not to override the jumbotron at the top of the page and move to a fixed position at the top of the page when I scroll down (just like in the documentation page except that I don’t care about active highlights)

I have tried to copy the source of the documentation and added docs.css file in the page as well but it doesn’t work for some reason. How can I do this?

EDIT

Here’s a figure to make it clear

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:46:26+00:00Added an answer on June 18, 2026 at 12:46 am

    Here is something to get you started: http://jsfiddle.net/panchroma/s9XpJ/

    I’ve used the affix behaviour which is really interesting and gives you lots of options.

    The important stuff in my example is in the HTML I’ve specified the div I want to spy on

    <div "span3" id="side-nav" data-spy="affix" data-offset-top="200">
     <!-- nav here -->
    </div>
    

    and specified the data-offset-top which is the distance you need to scroll before the div is affixed.

    The class affix will be added to the div when it’s affixed so in the CSS I’ve specified what happens then.

    #side-nav.affix{
    top:10px;
    }
    

    You generally need to reposition the affixed div on the page because by default bootstrap will define its position as fixed which brings it out of normal flow.

    I also added some CSS using media requests to fine tune what happens as the view point narrows. The example on the Bootstrap site removes the affixed behaviour of the side-nav for the narrowest screens. I repeated that here.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to animate a background position move from a div. The
I have been trying to fix this script for more than an hour and
Hi I have been trying to get this script http://jsbin.com/ipajo5/ working but using .live()
Possible Duplicate: How to recalculate correct position I have been trying to achive this
Have been trying to fix this problem I have here. Basically I have a
I have been trying to figure this out for a few hours now, using
I have been trying to create a ListView which I can sort using drag
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I have been trying to wrap my head around this for a while now
This is driving me crazy - I have been trying to get opacity working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.