Absolute positioning - recommended?

Discussion in 'ASP .Net' started by Iain, Oct 2, 2009.

  1. Iain

    Iain Guest

    All,

    I have certain web controls that are positioned via absolute
    positioning. The problem occurs when viewing via different browsers.
    Firefox will render the application fine, but IE7, IE8 will have the
    controls in the wrong position.

    What's the recommendation when positioning controls so it will render on
    ANY browser without issues?

    TIA
    Iain
     
    Iain, Oct 2, 2009
    #1
    1. Advertising

  2. On Oct 2, 11:09 am, Iain <> wrote:
    > All,
    >
    > I have certain web controls that are positioned via absolute
    > positioning. The problem occurs when viewing via different browsers.
    > Firefox will render the application fine, but IE7, IE8 will have the
    > controls in the wrong position.
    >
    > What's the recommendation when positioning controls so it will render on
    > ANY browser without issues?
    >
    > TIA
    > Iain


    Webcontrols must be reusable by definition. Thus, it's strange when a
    control is absolutely positioned.
     
    Alexey Smirnov, Oct 2, 2009
    #2
    1. Advertising

  3. Iain

    Iain Guest

    Alexey Smirnov wrote:

    >
    > Webcontrols must be reusable by definition. Thus, it's strange when a
    > control is absolutely positioned.


    Not sure i follow, what do you mean by "reusable"? Are you saying that
    absolute positioning is a bad idea? Is so what are the alternative(s)?
     
    Iain, Oct 2, 2009
    #3
  4. On Oct 2, 12:56 pm, Iain <> wrote:
    > Alexey Smirnov wrote:
    >
    > > Webcontrols must be reusable by definition. Thus, it's strange when a
    > > control is absolutely positioned.

    >
    > Not sure i follow, what do you mean by "reusable"? Are you saying that
    > absolute positioning is a bad idea? Is so what are the alternative(s)?


    Sorry, I probably misunderstood what you meant by "web controls". In
    general, absolute positioning is not bad in itself, and could be
    useful sometimes. But it's usually better to let the elements fall
    into place as the browser loads the code. Your problem is probably
    because not everything was absolutely positioned, or you have
    somewhere different borders/margins. You can try to fix it, or you can
    try to set different CSS especially for IE
     
    Alexey Smirnov, Oct 2, 2009
    #4
  5. Iain

    Scott M. Guest

    "Alexey Smirnov" <> wrote in message
    news:...
    On Oct 2, 11:09 am, Iain <> wrote:
    > All,
    >
    > I have certain web controls that are positioned via absolute
    > positioning. The problem occurs when viewing via different browsers.
    > Firefox will render the application fine, but IE7, IE8 will have the
    > controls in the wrong position.
    >
    > What's the recommendation when positioning controls so it will render on
    > ANY browser without issues?
    >
    > TIA
    > Iain


    >Webcontrols must be reusable by definition. Thus, it's strange when a
    >control is absolutely positioned.


    Where you place a control on a page has nothing to do with its ability to be
    reused.

    -Scott
     
    Scott M., Oct 2, 2009
    #5
  6. Iain

    Scott M. Guest

    There is nothing inherantly wrong with absolute positioning itself, it's
    just that in order for it to work properly, you've got to understand how the
    CSS that your are writing will be interpreted in different browsers.
    Margins, borders, width, height, and padding will all play a
    part in where the final position is.

    -Scott


    "Iain" <> wrote in message
    news:...
    > All,
    >
    > I have certain web controls that are positioned via absolute positioning.
    > The problem occurs when viewing via different browsers. Firefox will
    > render the application fine, but IE7, IE8 will have the controls in the
    > wrong position.
    >
    > What's the recommendation when positioning controls so it will render on
    > ANY browser without issues?
    >
    > TIA
    > Iain
     
    Scott M., Oct 2, 2009
    #6
  7. Iain <> wrote in news::

    > What's the recommendation when positioning controls so it will render on
    > ANY browser without issues?


    I think it is impossible to accurately render every time, the first time in
    all browsers. CSS is the route I go to make it less painful, but it is not
    a "you do this in CSS and it is magic" type of answer. It just makes it
    easier to tweak, as you can leave the site up and running and change the
    CSS file rather than spinning it back up in debug and then down and then up
    and then down. Probably not the answer you wanted.

    The drag and drop Grid feature that MS put out to make it so web forms were
    like win forms is more of a pain than it is worth, if you ask me.

    Peace and Grace,

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Twitter: @gbworld
    Blog: http://gregorybeamer.spaces.live.com

    *******************************************
    | Think outside the box! |
    *******************************************
     
    Gregory A. Beamer, Oct 2, 2009
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John A Grandy
    Replies:
    0
    Views:
    534
    John A Grandy
    Nov 17, 2004
  2. Rob R. Ainscough
    Replies:
    2
    Views:
    1,670
    Rob R. Ainscough
    Feb 7, 2006
  3. Fred Nelson
    Replies:
    1
    Views:
    2,470
    Christopher Reed
    Feb 21, 2006
  4. Matt Beckwith

    Absolute Positioning (CSS Question)

    Matt Beckwith, Jul 18, 2003, in forum: HTML
    Replies:
    4
    Views:
    1,842
  5. Jules
    Replies:
    6
    Views:
    1,378
    John C
    Nov 7, 2003
Loading...

Share This Page