PDA

View Full Version : CSS-Positioning Help Please


raja
10-23-2006, 07:15 PM
Hey Friends some one plz explain the positioning in css please. I want to know in detail if possible with detailed examples both relative and absolute positiong please.
i have seen lots of tutorials and books but still that concept is soo weird an confusing me. so please some one eplain me with clear examples on positioning both relative and absolute please.One more question is is it correct way to use both Floats and positiong intandum to an object? please explain. Thanks in advance

domedia
10-24-2006, 07:14 PM
Very simply:
Relative position: positions an element based on the position of it's parent element
Absolute position: positions an element based on the top left corner of the viewport.

Both is correct to use and part of the web standards. Which one you have more success with depends on your situation.

ranjan
10-25-2006, 02:14 PM
Very simply:
Absolute position: positions an element based on the top left corner of the viewport.


This is not correct

absolute positioning can be based on parent element


.parent {
position: relative;
}
.child {
position absolute;
top: 10px;
left: 10px;
}


The child will be 10 px left and top relative to its parents position

edit: right nowido not have the time to explain the concept, if you can wait, i'l do so this evening

domedia
10-25-2006, 05:11 PM
Very simply:
Absolute position: positions an element based on the top left corner of the viewport.

This is not correct Which would pretty much explain why I never do absolute positioning..

right nowido not have the time to explain the concept, if you can wait, i'l do so this evening Looking forward to it :)

raja
10-29-2006, 03:33 PM
Very simply:
Absolute position: positions an element based on the top left corner of the viewport.

This is not correct Which would pretty much explain why I never do absolute positioning..

right nowido not have the time to explain the concept, if you can wait, i'l do so this evening Looking forward to it :)

Am also looking for it. I need some examples as well to understand this concept more precisely plz.