Jump to content

Is it possible to stop an element scrolling with css?


loggo

Recommended Posts

Hi!

 

I would like to use a similar effect like on the content pages of w3schools for the navigation. This means when scrolling down the page the navigation stops scrolling when it reaches the top of the window. I have already searched for this in several places but I couldn't find a solution using CSS.

 

Here is the example:

http://www.w3schools.com/html/default.asp

 

First the navigation scrolls upwards and then stops at the top of the page. Is it possible to create this by using CSS and if yes, how? If it is not possible with CSS, what would you recommend for this?

 

Thanks for your help!

 

Greetings,

loggo

Link to comment
Share on other sites

Thank you for your help but that's actually not what I am looking for. At least I cannot find the right thing with google. My problem is, that the bar shall not be at top right at the beginning but moves upwards when scrolling until it reaches the top of the window. Everything I can find when searching for "Fixed Navigation Bar" is navigation bars that are already at top position when loading the page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...