Is it possible to position a DIV relative to another DIV? I imagine this can be done by first placing it inside of the reference DIV, and then using position: relative. However, I can’t figure out how to do this without affecting the contents of the reference DIV. How can I do this properly?
Is it possible to position a DIV relative to another DIV? I imagine this
Share
First set
positionof the parent DIV torelative(specifying the offset, i.e.left,topetc. is not necessary) and then applyposition: absoluteto the child DIV with the offset you want.It’s simple and should do the trick well.