My site navigation needs to be floated to the right side of the container, but be in a fixed position so that whenever the page scrolls, the navigation is still on the right 350px from the top. This worked until I applied position:fixed
, after doing that the navigation is stuck on the right. Any ideas how I can have the best of both worlds(right side, and fixed position)?
The usage of position: fixed requires adjusting the top/right/bottom/left CSS to get your nav element to the desired location.
For example:
nav {
right: 0;
top: 50%;
}
or
nav {
right: 0;
top: 0;
}