Is it good or bad to make a web page with position: absolute to all element?
Is it good or bad to make a web page with position: absolute to
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.
This completely depends on what are you attempting to achieve. Absolute position can cause unwanted overlap in some cases, and in addition will take the specific element out of the document flow, but in many cases this may be the desired effect and can be accounted for.
In addition, using absolute positioning inside a parent element with relative positioning can allow you to place elements in a position that is relative to their parents constraints. Refer to this article to learn more: http://css-tricks.com/absolute-positioning-inside-relative-positioning/
Edit: Missed the fact that you were planning on doing this for every element. This is a very poor way of designing a web page, unless you were doing this for a small number of elements where your desired layout could not be achieved by more conventional means. The issue is that you’ll be required to set the top and left coordinates for every single element – if you decided to move one element, or change its size, suddenly you’ll have to change the positions of all your elements.