Float and position confusion css

Could anyone tell me why some css stylesheet can use position and float at the same time?

float: left;

&

position:relative;
left:0px;

both result is the same?

I don’t know I’ve never done it. I would assume so. Using left:1px should move the float over one.

You can use relative positioning with floats just like any normal element and it will move the floats by the co-ordinates that you specify. Remember though that position relative doesn’t actually move anything physically but only visually. It always occupies the same space in the flow that it always did.

If you use left:0 then the element is not moved at all so there is no effect and would be pointless unless it was to over-ride a previous value in the stylesheet.

Position:relative is needed if you want to control z-index as only positioned elements obey z-index and therefore you would add it to a float if you wanted to make sure t was on top of some other positioned element…

You can’t use floats with absolute positioning because absolute positioning wins out and float is ignored.

Thk for the enlighten