Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

creating a responsive sidebar  RSS feed

 
Puspender Tanwar
Ranch Hand
Posts: 451
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am developing a website using bootstrap. The requirement was that the menu should be fix on the top even if we scroll down the page. I fullfilled it using bootstrap's navbar class. But now the requirement is a fixed sidebar as well. Even if we scroll down the page, sidebar must retain its possition irrespective of the center content page.
The website should be like w3schools
It has a fixed navigation bar at top and a sidebar in left which is not dependent on center content.

Screen-Shot-2017-04-26-at-1.25.58-AM.png
[Thumbnail for Screen-Shot-2017-04-26-at-1.25.58-AM.png]
 
s ravi chandran
Ranch Hand
Posts: 557
6
Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The logic for this one would be to have a div with fixed position and then use javascript to update top position as the page is scrolled.

Found this link in one of the forums: example discussed in thread forum topic.

You can always understand this logic and make your own version of implementation using css, javascript, jquery or bootstrap
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!