tags:

views:

19

answers:

2

in between lots of floated elements if we give position:relative to any element to use position:absolution inside, will it effect to flow of document?

FLOAT 1  |  FLOAT 2  |  FLOAT 3 + position relative |  Float 4

if i only want to give pixel perfect position to an element inside Float 3 box then what should i do? I need compatibility in all browser including IE6

A: 

No, position: relative won't affect that element's flow, it will just allow you to give child elements absolutely positioned to it, and a few extra tricks (like using z-index to raise it's z stacking index).

alex
see my updated question
metal-gear-solid
A: 

No, it won't. Position relative normally does not affect the flow of the document (siblings) at all unless it is a browser bug. Of course it is meant to affect how a position:absolute child is positioned.

position: relative is the correct way to allow for an absolutely positioned child element.

Doug Neiner
is it compatible to all browser?
metal-gear-solid
All mainstream browsers, with a valid `DOCTYPE`, yes.
Doug Neiner