That's the correct behaviour for relative positioning. If you just want to set a reference point, you can use a absolutly positioned element inside a relatively positioned element. For example:
Code:
Other Content Other Content Other Content Other Content
<div style="color:#c0c0c0;position:relative;">
<b>Sample Text</b>
<div style="color:#000000;position:absolute;left:2px;top:-1px;">
<b>Sample Text</b>
</div>
</div>
Other Content Other Content Other Content Other Content
This produces a kind of shadow effect on the text "Sample Text."
The first "Sample Text" div is relatively positioned but with left and top values of (0,0) so it appears where it normally would. Because it is a positioned element, it establishes a new containing block for any positioned elements within it.
The inner div is absolutely positioned at (2,-1) but this is measured from the top-left corner of the outer div, it's containing block.
So, if you add or remove content around the outer, relatively positioned div, it will move accordingly. The inner, absolutely positioned div will also move - following it's containing block. For example, try adding several lines of text to the above to move it down the page:
Code:
Other Content Other Content Other Content Other Content<br>
Other Content Other Content Other Content Other Content<br>
Other Content Other Content Other Content Other Content<br>
Other Content Other Content Other Content Other Content
<div style="color:#c0c0c0;position:relative;">
...
Both "Sample Text" divs will move down the page the same amount.