Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Midlands, UK
    Thanked 29 Times in 28 Posts

    Absolute positioning... Good or bad and why?

    Can anyone offer any reasons why a site using absolute positioning throughout, for a complex layout, would be a bad idea?
    Definition: Computer rage is a heightened physiological response with associated feelings of anger and frustration[1] resulting from using a computer or other complex electronic device. It may result in the physical assault of the computer or similar item.[2] Computer use often leads to verbal abuse and occasionally physical violence towards the object.[3] Computer rage may be caused by distress due to a hardware or software problem which the enraged person is unable to correct.

  2. #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Clapham Junction - London SW
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by Doctor_Varney View Post
    Can anyone offer any reasons why a site using absolute positioning throughout, for a complex layout, would be a bad idea?
    It breaks up very much if the viewers resolution is different from the original.
    If you give a div a left margin of 1000px and the viewer is using 800x600; the result will be a bit of a disaster. Having said that, absolute positioning has its place if you are careful how you use it.

    In a closed system where there is complete control of the viewing monitors, it is obviously OK.

    Have you seen this page?

    Last edited by effpeetee; 10-29-2008 at 02:19 PM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  3. #3
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Halle (Saale), Germany
    Thanked 1,313 Times in 1,283 Posts
    Yeah, can only second what effpeetee said. Absolute positioning can be useful if you use it wisely and where it wouldn’t break anything, for example for inline popup “windows” or if ou have elements within a container that don’t interfere with each other if the user resizes his/her text or browser window. It depends what you understand by a “complex layout”, though. Sometimes layouts are that complex that you just can’t do without absolute positioing. In such cases the combination with overflow: auto; and using em units for sizes can keep issues at a minimum.

    Mostly the bad thing about absolute positioning is that you have no control over the layout if the content of elements or the general available space is changing for some reason. So it’s wise to use it only for things where this isn’t crucial.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts