What's the difference between position: fixed, relative, and absolute?
Asked by
Breefield (
2733)
May 12th, 2008
from iPhone
Observing members:
0
Composing members:
0
5 Answers
I’ve got an article bookmarked for this explanation. Have fun!
Or from W3schools . Their page has some good try it yourself demos to help you get the picture.
I also have an article bookmarked but I can’t really remember if it was about this. positioniseverything is great though, and surely has what you need.
All great articles, but the basic difference is this:
Fixed is the position of an object in relation to the browser window.
Absolute is the position of an object in relation to its containing element (just ask if this concept needs explained.. I’m not sure how CSS-savvy you are)
Relative is the position of an object in relation to where it would be if its position were not changed by you
Nope, that makes tons of sense. I like the minimal explanation – that’s all I needed.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.