Why is aboslute positioning not used more?

Discussion in 'CSS' started by mnymkr, Aug 21, 2006.

  1. #1
    Do the browsers support absolute positioning differently?

    If you know exactly how you site will be laid out why is this a problem?

    I see people trying to force fix width 3-coulmns with flaots, why not just position aboslute?
     
    mnymkr, Aug 21, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Absolute positioned (AP) elements are not in the flow. They have no cognizance of other elements, nor vice versa. There are no shared relationships other than that of nearest positioned ancestor for positional reference. As a result, everything must be presized and prepositioned, similar to an old style newspaper layup. To the neophyte, this looks like a dream come true; just use AP and stick'em where you want'em. The gotchas come out when you decide to change some bit of content so it no longer fits. Now you have to refigure the locations for everything. There's nothing you can do if the user decides to resize the font and shatters your fragile work of art.

    Floats are out of the flow too, but they retain certain relationships with their parents, sibling's inline nodes and descendants that can be used to create robust and dynamic layouts.

    AP based layouts are effectively used by experienced developers, but the funny thing is, the more knowledgeable you become about AP, the less you find you need it for more than local context positioning, drop down menus for one example.

    cheers,

    gary
     
    kk5st, Aug 21, 2006 IP
    dddougal likes this.
  3. dddougal

    dddougal Well-Known Member

    Messages:
    676
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Wow, thats the best description I would have hoped for.
     
    dddougal, Aug 23, 2006 IP