Relative Content

Tag Archive for cssscrollcss-position

Why Doesn’t right: 50%; Work, But left: 50%; Does?

So, I’ve been working on getting a div to be in the middle of the screen, but under certain circumstances and I found out that left: 50%; works to get it in the middle, but right: 50%; doesn’t and there is one scenario where I may need that, so why doesn’t right:50%; get it in the middle of the screen?

How To Have Div Fixed To Middle Of Screen, Yet Only In The X-Plane?

So basically I want a div that is in the middle of screen and it is fixed there, but only in the x-axis, so no matter if I scroll left or right, it stays in the middle of the screen however when I want to scroll down I want to it to scroll away just like it would if it were relative. I hope you understand what I mean.