locked
absolute positioning RRS feed

  • Question

  • I have never used absolute positioning in my CSS. This is mainly because of having read various articles saying that it is a "dangerous" thing to use, especially since designers never know exactly what size window or monitor the user is working with, and as a result, anything with an absolute position is by definition going to be different for two users with different browser setups. Am I not understanding it properly?
    What do the folks here think?

    Mart
    Thursday, August 21, 2008 12:34 PM

Answers

  •  As a general rule I avoid absolute positioning like the plague even though I understand how it owrks which is more than many who use it do. They use it because it gives them the illusion of control since they expect it behave like their favorite graphics editor. However, the web is not a fixed canvas.

    Absolute postioning just doesn't scale well, anything different on the visitor's comptuer than on your can cause display issues with overflowing containers and overlaps. This can happen when any of the following is different between the computer the site is creaed on and what the visitor is viewing it on: operating system (different defaults on ppi), browser, screen resolution, font size settings. Then there are device related issues. I don't know about your household but I can choose between viewing on a computer (PC or MC), a cellphone (Windows Mobile, Motorola Razr, Opera Mobile or Symbios), game console (common ones Wii, Playstation, xBox), set top box (can browse some web pages on our Uverse box and many of the hotels I stay in while traveling offer set top web access).

    Have I used absolute postioning? Yes, did the site I used it on have problems with overlaps or overflowing containers? No, but the only reason I used absolute positioning is because that site was created in 2000 when there were still a significant number of people using Netscape 4.x which had a lot of non-standard CSS implementations. The site used techniques to separate out the content that Netscape would get from that of better browsers, primarily the @import and use of inheritance so that better browsers got the right info and primative ones like NN4 didn't. Progressive enhancement is the term used today for that sort of technique. However, I digress. Given the capabilitis of current browsers I wouldn't create that site the same way since there were quite a few limitations on how the page could be presented using absolute positioning.

    --
    Cheryl D Wise
    MS MVP Expression
    http://by-expression.com

    Last chance to register for the August 30,2008 class session http://starttoweb.com:
    Introduction to Expression Web class
    Migrating from FrontPage to Expression Web class

    Free Beginner tutorial: Creating a basic website


    MS MVP Expression http://by-expression.com
    Thursday, August 21, 2008 2:41 PM
  • I wrote a fairly detailed explanation of the various positioning styles in a reply to another thread, which you may want to read: http://forums.expression.microsoft.com/en-US/web/thread/72d1e8e6-51a2-4a9a-9629-6539173cb12b

    HTH
    Kevin Spencer, Chicken Salad Alchemist
    Friday, August 22, 2008 11:24 AM

All replies

  •  As a general rule I avoid absolute positioning like the plague even though I understand how it owrks which is more than many who use it do. They use it because it gives them the illusion of control since they expect it behave like their favorite graphics editor. However, the web is not a fixed canvas.

    Absolute postioning just doesn't scale well, anything different on the visitor's comptuer than on your can cause display issues with overflowing containers and overlaps. This can happen when any of the following is different between the computer the site is creaed on and what the visitor is viewing it on: operating system (different defaults on ppi), browser, screen resolution, font size settings. Then there are device related issues. I don't know about your household but I can choose between viewing on a computer (PC or MC), a cellphone (Windows Mobile, Motorola Razr, Opera Mobile or Symbios), game console (common ones Wii, Playstation, xBox), set top box (can browse some web pages on our Uverse box and many of the hotels I stay in while traveling offer set top web access).

    Have I used absolute postioning? Yes, did the site I used it on have problems with overlaps or overflowing containers? No, but the only reason I used absolute positioning is because that site was created in 2000 when there were still a significant number of people using Netscape 4.x which had a lot of non-standard CSS implementations. The site used techniques to separate out the content that Netscape would get from that of better browsers, primarily the @import and use of inheritance so that better browsers got the right info and primative ones like NN4 didn't. Progressive enhancement is the term used today for that sort of technique. However, I digress. Given the capabilitis of current browsers I wouldn't create that site the same way since there were quite a few limitations on how the page could be presented using absolute positioning.

    --
    Cheryl D Wise
    MS MVP Expression
    http://by-expression.com

    Last chance to register for the August 30,2008 class session http://starttoweb.com:
    Introduction to Expression Web class
    Migrating from FrontPage to Expression Web class

    Free Beginner tutorial: Creating a basic website


    MS MVP Expression http://by-expression.com
    Thursday, August 21, 2008 2:41 PM
  • Thanks Cheryl. As I suspected.
    Friday, August 22, 2008 7:51 AM
  • I wrote a fairly detailed explanation of the various positioning styles in a reply to another thread, which you may want to read: http://forums.expression.microsoft.com/en-US/web/thread/72d1e8e6-51a2-4a9a-9629-6539173cb12b

    HTH
    Kevin Spencer, Chicken Salad Alchemist
    Friday, August 22, 2008 11:24 AM