I have a webpage in which there is scrollable content. This content is wrapped inside #content, which is centered on the page. Now I want a navigation bar to appear 50px left to the content. This bar should have a fixed position (shouldn't scroll).
This is what I have tried so far:
#nav {
position: fixed;
top: 50%;
margin-top:-200px;
left:15%;
background: #FFF;
width: 100px;
height:400px;
border-radius: 50px;
}
#content {
position: relative;
width: 800px;
margin: 0px auto;
padding-top: 100px;
}
Which is obviously not what I want, because now the nav is 15% from the left of the screen.
Here's an image to illustrate what I want to achieve.