Absolute positioning - recommended?

  • Thread starter Thread starter Iain
  • Start date Start date
I

Iain

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
 
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 said:
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)?
 
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
 
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
 
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 said:
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! |
*******************************************
 
Back
Top