General Question

Breefield's avatar

What's the difference between position: fixed, relative, and absolute?

Asked by Breefield (2728points) May 12th, 2008 from iPhone

Google can be a hater.

Observing members: 0 Composing members: 0

5 Answers

Perchik's avatar

I’ve got an article bookmarked for this explanation. Have fun!

Perchik's avatar

Or from W3schools . Their page has some good try it yourself demos to help you get the picture.

Vincentt's avatar

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.

lefteh's avatar

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

Breefield's avatar

Nope, that makes tons of sense. I like the minimal explanation – that’s all I needed.

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther