Hello,
Having been a light reader of this ng for a few months now (after
several years absence), I have noticed that absolute positioning seems
to be considered a Very Bad Thing around here. Generally, when someone
posts a question about a design that uses it, they are told not to.
Now, in my ignorance, I don't see what's wrong with it, when used
sensibly. Let me say straight off that I am *not* talking about trying
to produce pixel-perfect designs, that's not what the web is for
(AFAIK).
As an example of what I mean, suppose you wanted a three-column layout,
with the left and right columns fixed width (in em or %), and the middle
column fluid. It looks like you could do this really easily with
absolute positioning. You could fix the position of the left and right
columns, and give the middle one margins to suit. Seems very robust and
simple to me.
Now, given that I'm *no* expert in this, would anyone care to comment on
this? There must be some reason why people don't like absolute
positioning, unless the negative reaction is against people trying to do
pixel-perfect design. Comments?
TIA
--
Alan Silver
(anything added below this line is nothing to do with me) 4 2045
Alan Silver <al*********@nospam.thanx.invalid> wrote: Having been a light reader of this ng for a few months now (after several years absence), I have noticed that absolute positioning seems to be considered a Very Bad Thing around here. Generally, when someone posts a question about a design that uses it, they are told not to.
Now, in my ignorance, I don't see what's wrong with it, when used sensibly.
Correct, but if you look at the examples that are criticized here it is
not used sensibly.
Let me say straight off that I am *not* talking about trying to produce pixel-perfect designs, that's not what the web is for (AFAIK).
Many don't realize that, to them absolute positioning is a way to
finally get rid of that awkward "doesn't always look the same" thing.
This often results in people absolutely positioning every blooming
element.
As an example of what I mean, suppose you wanted a three-column layout, with the left and right columns fixed width (in em or %), and the middle column fluid. It looks like you could do this really easily with absolute positioning. You could fix the position of the left and right columns, and give the middle one margins to suit. Seems very robust and simple to me.
Yes that's fine in principle, although 3 columns is a lot (typically
won't scale well to narrower viewports).
--
Spartanicus
In article
<vv********************************@news.spartanic us.utvinternet.ie>,
Spartanicus <in*****@invalid.invalid> writes
<snip> As an example of what I mean, suppose you wanted a three-column layout, with the left and right columns fixed width (in em or %), and the middle column fluid. It looks like you could do this really easily with absolute positioning. You could fix the position of the left and right columns, and give the middle one margins to suit. Seems very robust and simple to me.
Yes that's fine in principle, although 3 columns is a lot (typically won't scale well to narrower viewports).
OK, that's a separate point. I was using this merely as an example of
where absolute positioning appeared to offer a significant benefit.
Thanks for the reply, you've set my mind at ease!!
--
Alan Silver
(anything added below this line is nothing to do with me)
Alan Silver wrote : Hello,
Having been a light reader of this ng for a few months now (after several years absence), I have noticed that absolute positioning seems to be considered a Very Bad Thing around here. Generally, when someone posts a question about a design that uses it, they are told not to.
Now, in my ignorance, I don't see what's wrong with it, when used sensibly. Let me say straight off that I am *not* talking about trying to produce pixel-perfect designs, that's not what the web is for (AFAIK).
As an example of what I mean, suppose you wanted a three-column layout, with the left and right columns fixed width (in em or %), and the middle column fluid. It looks like you could do this really easily with absolute positioning. You could fix the position of the left and right columns, and give the middle one margins to suit. Seems very robust and simple to me.
Now, given that I'm *no* expert in this, would anyone care to comment on this?
1- MSIE 6 has **lots** of implementation bugs on absolute positioning,
on containing block calculations.
2- Abs. pos. content is extraordinary difficult to select with mouse and
keyboard in MSIE 6
3- Abs. pos. blocks are taken out of normal flow; accessibility and
usability of a website often underestimate this. Non-abs. pos. blocks
will therefore behave quite differently from abs. pos. blocks.
Gérard
--
remove blah to email me
On Thu, 16 Mar 2006 16:30:21 +0000, Alan Silver
<al*********@nospam.thanx.invalid> wrote: I have noticed that absolute positioning seems to be considered a Very Bad Thing around here.
Second problem - absolute positioning only makes sense on an absolute
canvas. If you're aiming for a fluid design on varying windows, then
absolute positioning makes this hard. It's like table-based layout - an
easy way to control grid-based layouts, but we don't _want_ grid-based
layouts.
Main problem though is that absolute jumps out of the page flow and
stops a lot of UI stuff working easily (browser dependent). It's OK for
a floating toolbar or such, but not good for the main body text column.
Also doing it right isn't exactly difficult ! It's not easy to work it
out, but it's very easy to find a well-implemented example from a good
tutorial site and use that. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Harlan Messinger |
last post by:
What am I not understanding about the definition of { position: absolute; }?
"The box's position (and possibly size) is specified with the 'left',
'right', 'top', and 'bottom' properties. These...
|
by: Griff Miller |
last post by:
Please see http://home.houston.rr.com/gmiller15/css/vertprob.html .
In mozilla 1.6/1.7 it looks the way I want it, with a thin separation
between the two boxes. In IE6, the two boxes touch, which...
|
by: mike eli |
last post by:
Hi,
I have several absolute positioned elements inside an absolute
positioned DIV.
I would like one of the nested elements to have a dynamic width. I set
it's left and right attributes to 5, so...
|
by: Lars A. Gundersen |
last post by:
So I'm starting out with CSS positioning, and it seems to work fine -
until I check in IE6/Win, of course.
I'm trying to use absolute positioning to place a box with my site's
main contens area...
|
by: Rob R. Ainscough |
last post by:
I'm slowly (very slowly) working my way thru the bizarre and sadistic world
of control positioning in MultiViews (ASP 2.0). I came across this to help
me explain (or attempt to anyway) why my web...
|
by: nonsensitor |
last post by:
I'm just learning xhtml & css, primarily from westciv's online tutorials and css guide. I've run into a couple of problems with a page I'm developing that I can't figure out.
The first problem is...
|
by: Mark |
last post by:
hi, i'm trying to position something in the top right corner of a
container, but i can't seem to figure out how to get it working.
here's the html
<div class='thumb'><a href='image.jpg'><img...
|
by: mehstg1319 |
last post by:
Hi there
Not sure if anyone can help me, I am working on a site for my
university, and am having a bit of trouble with css positioning. I am
very new to css and do not know very much about it....
|
by: Fistro |
last post by:
I'm trying to find a design that would allow me to build web pages
without having to worry about compatibility issues (not too much, in
any case,,,)
I've came across this CSS layout technique:...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
| |