| Refresh | Home EGTry.com

relative positioning - shift based relative to its assigned position in normal model


CommentsHTML sourcedisplay in your current browser
the default "static" positioning
<h3>line 1</h3>
<h3>line 2</h3>
<h3>line 3</h3>

line 1

line 2

line 3

relative positioning for second line
<h3>line 1</h3>
<h3 style="position:relative;left:10px; top:20px">line 2</h3>
<h3>line 3</h3>

line 1

line 2

line 3

relative positioning for second line
<h3>line 1</h3>
<p style="position:relative;left:40px">
This paragraph has been indented to right using relative positioning
</p>
<h3>line 3</h3>

line 1

This paragraph has been indented to right using relative positioning

line 3

left or top has no effect with the default static positioning
<h3>line 1</h3>
<h3 style="left:10px; top:20px">missing position:relative style</h3>
<h3>line 3</h3>

line 1

missing position:relative style

line 3

left or top has no effect with the default static positioning
<p>line 1</p>
<div style="position:relative;left:10px">position:relative here
  <p style="position:relative;left:10px">shift again</p>
</div>
<p>line 3</p>

line 1

position:relative here

shift again

line 3