HighDots Forums  

DIV position: relative, static, not specified

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss DIV position: relative, static, not specified in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
judas2
 
Posts: n/a

Default DIV position: relative, static, not specified - 08-05-2004 , 12:14 PM






I don't understand the difference in the div position. I understand very well
the absolute position. Usually I set no position in my divs. Could anybody
explain to me the meaning of static and relative? The DW guide is not very
clear. It isn't urgent? just to know?
Thx.


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: DIV position: relative, static, not specified - 08-05-2004 , 12:28 PM






Position:absolute
-----------------------
This does several things -
1. It 'removes' the element from the flow of the code on the page so that it
can no longer influence the size or position of any other page element
(except for those contained within it, of course).
2. It takes its position from the position of its closest PARENT positioned
element - this is often the <body> tag, which is positioned at 0,0 in the
browser viewport.

This means that it doesn't matter where in the code the layer's code
appears, its location on the screen will not change. Furthermore, the space
in which this element would have appeared were it not positioned is not
preserved on the screen.

Position:relative
----------------------
A relatively positioned page element is *not* removed from the flow of the
code on the page so it will use the spot where it would have appeared based
on its position in the code as its zero point reference. If you then supply
top, right, bottom, or left positions to the style for this element, those
values will be used as offsets from its zero point.

This means that it DOES matter where in the code the relatively positioned
element appears, as it will be positioned in that location (factoring in the
offsets) on the screen. Furthermore, the space where this element would
have appeared is preserved in the display, and can therefore affect the
placement of succeeding elements.

Position:static
-------------------
As with a relative position, static positions also "go with the flow". An
element with a static position cannot have values for offsets (top, right,
left, bottom) or if it has them, they will be ignored.

Position:fixed
------------------
A page element with this style will not scroll as the page content scrolls.
Support for this in elements other than page backgrounds is quirky.

--
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
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I don't understand the difference in the div position. I understand very
well
the absolute position. Usually I set no position in my divs. Could anybody
explain to me the meaning of static and relative? The DW guide is not very
clear. It isn't urgent? just to know?
Thx.




Reply With Quote
  #3  
Old   
judas2
 
Posts: n/a

Default Re: DIV position: relative, static, not specified - 08-05-2004 , 01:25 PM



Murray, how are you?
Copied and pasted your lesson to remind it better.
One more question:
Setting no positions means that my div will "go with the flow". What's then
the difference with a static position?
When do you go to holydays?


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: DIV position: relative, static, not specified - 08-05-2004 , 01:27 PM



Quote:
Setting no positions means that my div will "go with the flow". What's
then
the difference with a static position?
None.

Quote:
When do you go to holydays?
I don't observe holy days. Or do you mean holidays? Heck - I'm always on
holiday.... 8)

--
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
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Murray, how are you?
Copied and pasted your lesson to remind it better.
One more question:
Setting no positions means that my div will "go with the flow". What's
then
the difference with a static position?
When do you go to holydays?




Reply With Quote
  #5  
Old   
judas2
 
Posts: n/a

Default Re: DIV position: relative, static, not specified - 08-05-2004 , 02:13 PM



I meant holidays. If you're always on holiday now you NEED a holiday!!!

Reply With Quote
  #6  
Old   
Michael Fesser
 
Posts: n/a

Default Re: DIV position: relative, static, not specified - 08-05-2004 , 09:47 PM



.oO(judas2)

Quote:
Setting no positions means that my div will "go with the flow". What's then
the difference with a static position?
No difference, static is the default value.

9.3.1 Choosing a positioning scheme: 'position' property
http://www.w3.org/TR/CSS21/visuren.html#choose-position

Micha


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.