This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > February 2006 > Absolute positioning
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Absolute positioning
|
|
|
| 1) I understand the absolute positioning means absolute to the immediate
contain which itself is postioned using absolute positioning.
Is my understanding correct? For I have multiple DIVs inside a DIV which
itself is absolutely positioned and the inner DIVs are where I expect them
to be.
My guess is the problem might be caused by the fact that the outer DIV is
inside a DIV which is FLOATed. Regardless, I can't get this to work.
2) On another note, I've read a lot about positioning. It would strike me
that it would be best, when possible, to use absolute positioning. I say
this because I would guess that pages would load faster since the browser
should have less calculating to do. Is this the case?
TIA
| |
| Randy Edmunds 2006-02-24, 10:15 am |
| http://www.w3.org/TR/REC-CSS2/visud...g-block-details
"If the element has 'position: absolute', the containing block is
established by the nearest ancestor with a 'position' other than 'static'"
If position is not defined, then the default is 'static'. So, give
"position:relative" to the box that you want the "position:absolute" to
offset from.
Randy
> 1) I understand the absolute positioning means absolute to the immediate
> contain which itself is postioned using absolute positioning.
| |
| David Blomstrom 2006-02-24, 10:15 am |
| Karl wrote:
> 1) I understand the absolute positioning means absolute to the immediate
> contain which itself is postioned using absolute positioning.
>
> Is my understanding correct? For I have multiple DIVs inside a DIV which
> itself is absolutely positioned and the inner DIVs are where I expect them
> to be.
>
> My guess is the problem might be caused by the fact that the outer DIV is
> inside a DIV which is FLOATed. Regardless, I can't get this to work.
>
>
> 2) On another note, I've read a lot about positioning. It would strike me
> that it would be best, when possible, to use absolute positioning. I say
> this because I would guess that pages would load faster since the browser
> should have less calculating to do. Is this the case?
>
> TIA
>
I doubt that positioning has any measurable impact on page loading time.
I don't know what's causing your problem, but combining absolute
positioning with floats can be tricky, since each one by itself can be
tricky.
| |
| Css Lover 2006-02-24, 10:15 am |
| You can cry tears when using absolute positioning on too many divs, my advice
is to add one div, position it, then test it on IE and Firefox.
I only use absolutepositioning for 'fancy bits', ie: images dropped over other
images. You can get 4 images on top of each other this way, but I always have
trouble when trying to bring too many elements into play.
You have margins to think of, and floating divs pushing others out of the way.
Still, I find that absolute positioning is what it says - and using background
images is a good way to make a website look good.
| |
| Murray *TMM* 2006-02-24, 10:15 am |
| > Is my understanding correct?
No. It's partially correct. An absolutely positioned element uses the 0,0
coordinates of it's closest positioned ancestor as the reference point.
That ancestor can be positioned relatively, absolutely, or fixed, as Randy
said - anything but static. In the absence of any such ancestor, the body
tag is used as default.
> For I have multiple DIVs inside a DIV which itself is absolutely
> positioned and the inner DIVs are where I expect them to be.
That would be correct.
> My guess is the problem might be caused by the fact that the outer DIV is
> inside a DIV which is FLOATed. Regardless, I can't get this to work.
I doubt it, but what is it you are trying to do - I can't really know what
the code is without seeing it.
> 2) On another note, I've read a lot about positioning. It would strike me
> that it would be best, when possible, to use absolute positioning.
You need to read more. This is definitely not true. Most experienced CSS
layouts rarely use any positioning.
> pages would load faster since the browser should have less calculating to
> do. Is this the case?
No.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"Karl" <kthompson@pine-grove.com.nospam> wrote in message
news:dtlgsb$1nt$1@forums.macromedia.com...
> 1) I understand the absolute positioning means absolute to the immediate
> contain which itself is postioned using absolute positioning.
>
> Is my understanding correct? For I have multiple DIVs inside a DIV which
> itself is absolutely positioned and the inner DIVs are where I expect them
> to be.
>
> My guess is the problem might be caused by the fact that the outer DIV is
> inside a DIV which is FLOATed. Regardless, I can't get this to work.
>
>
> 2) On another note, I've read a lot about positioning. It would strike me
> that it would be best, when possible, to use absolute positioning. I say
> this because I would guess that pages would load faster since the browser
> should have less calculating to do. Is this the case?
>
> TIA
>
| |
| Murray *TMM* 2006-02-24, 10:15 am |
| > You have margins to think of, and floating divs pushing others out of the
> way.
What? Absolutely positioned elements cannot interact with any other page
elements....
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"Css Lover" <webforumsuser@macromedia.com> wrote in message
news:dtlr04$dmj$1@forums.macromedia.com...
> You can cry tears when using absolute positioning on too many divs, my
> advice
> is to add one div, position it, then test it on IE and Firefox.
>
> I only use absolutepositioning for 'fancy bits', ie: images dropped over
> other
> images. You can get 4 images on top of each other this way, but I always
> have
> trouble when trying to bring too many elements into play.
>
> You have margins to think of, and floating divs pushing others out of the
> way.
>
> Still, I find that absolute positioning is what it says - and using
> background
> images is a good way to make a website look good.
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|