Is it possible to change DIV position from absolute to relative (and from relative to absolute)?
DIV should remain on same place.
Is it possible to change DIV position from absolute to relative (and from relative
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you can change that attribute with
For instance:
You could use jQuery’s methods
.position()or.offset()to set “top” and “left”css attribute aswell, that way your object should stay at it’s position changing
from relative -> absolute.
I don’t think that works vice versa.
demo code: http://jsbin.com/uvoka