-
difference between relative and absolute position
hi,
what is the difference between absolute and relative positioning in DHTML?
Thnx
-
The absolute position of an element is it's position relative (ugh! but true) to the parent's origin.
The relative position of an element is it's position relative the position it would have been in had it not been positioned at all.
Have a look at this:
<div id="divA" style="position:absolute: left:100; top:50;">
Hello.
How are you?.
Goodbye
</div>
and compare to this:
<div id="divA" style="position:absolute: left:100; top:50;">
Hello.
<span id="spanB" style="position:relative: left:10; top:20;">
How are you?.
</span>
Goodbye
</div>
-
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks