Click to See Complete Forum and Search --> : css layer in framed env.:acc.to Browser window or the current Frame Window?


kusi
10-24-2003, 05:50 AM
Salut friends,

the absolute and relative attributes of a layer in a framed environment: How are they handled?
absolute/relative according to the current window/frame in which it exists, or to the browser window?

At the moment I have a new layer I even made its z-index 1; and "visible"; but it stays on an unexpected place and under the current layers, which are without z-index.

gil davis
10-24-2003, 07:50 AM
Positioning is offset by the containing object. If the object is a child of "body" and declared "absolute", then it would appear offset from the browser window and following objects will take their position as if the object was not there. If it is declared "relative", then it would appear offset from where the object would have been had it not been declared "position: relative", and following objects will flow around the object.

If the object is a child of another object, then the position is offset by the origin of that object.

For more on positioning, see http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/position.asp

As to the "z-index", it is not affected by positioning. If an object has no z-index declared, then it should be below any object with a positive z-index. If z-index is the same, things are stacked according to source order. There are objects called "windowed objects" (such as the SELECT object) that always have visible priority and do not obey z-index rules. See http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/zindex.asp

kusi
10-27-2003, 02:14 AM
what i face strange is with the frames.
my layer gets allocated with respect to the browser window somehow, although it is in a frame and must start the top and left properties according to that frame!