View Full Version : Positioning in CSS -- Relative


Tai
10-02-2004, 10:04 PM
Hi

I cannot understand the term Relative positioning ??

I now the other positioning but not this ---- can anyone explain in simple terms please, I would love to know :)

Chris
10-02-2004, 10:12 PM
When you position something relatively, you are modifying its position from where it would have been if you hadn't changed anything. I find that to be the easiest way of thinking about it. For instance, in the next sentence, I'll offset some words 12px down and 22px right relative to their start position.

Well, here are some words (some words)

The words in brackets are the words in their original positions, and the bold ones are the moved words. The CSS code to move them was

<span style="position: relative; top: 12px; left: 22px;">some words</span>

You should notice that if you want to move something left, you use the right code, and push it away from that side and vice-versa.

I got that from: http://www.yourhtmlsource.com/stylesheets/csslayout.html#relativepositioning

Chris

Tai
10-02-2004, 10:25 PM
Hi Chris

Thanks friend ----- I found the link very clear --- thats the clearest explanation I have found anywhere --- thanks so much, very kind :winner:

Great

Chris
10-02-2004, 10:29 PM
lol :D Your very welcome

Chris