PDA

View Full Version : Absolute or Relative Positioning


gwx
12-24-03, 05:55 PM
Which should i use? I usually use absolute but when I tried yesterday relative positioning, a lot of cross-browser issues ( esp. netscape and ie5 ) started cropping up... I guess its because of bad css practices?

Anyway, back to the question.. Which should i use and why..

eMGe
02-13-04, 06:10 PM
Which should i use? I usually use absolute but when I tried yesterday relative positioning, a lot of cross-browser issues ( esp. netscape and ie5 ) started cropping up... I guess its because of bad css practices?

Anyway, back to the question.. Which should i use and why..


You should use whichever the situation dictates. They are two different positioning functions. An abo****e positioned element is positioned at the specified pixel co-ordinates regardless of any other element or where in the flow of the document it exists. A relative positioned element is basically offset the specified pixel co-ordinates from where ever its normal position would be based upon its position with in the normal flow of the documents.

mg