El Thu, 14 Sep 2006 09:15:13 +0100, Spartanicus escribió:
Warren Post <wp***@hondutel.hnwrote:
>>Then I scroll horizontally in the
second screenshot
Scrolling horizontally was the missing bit of data.
Specifying "background-attachment:fixed" pins your image to the viewport
http://www.w3.org/TR/CSS21/colors.ht...und-attachment
A brief explanation of the relevant phrases, just in case you are not
familiar with them: the "viewport" is the visible area inside a browser
document window or tab, it is your view onto the document, or part view
if the viewport isn't big enough to display it all. "Underneath" the
viewport lies the "canvas", this is the area on which the document is
rendered.
If the content doesn't fit in the viewport then the browser will
generate scollbars. By using the scrolling mechanism you effectively
move the viewport over the (in this case larger) canvas to enable you to
see the remaining content. During scrolling a
"background-attachment:fixed" image will remain pinned to the viewport,
not the canvas.
With CSS2.x it is not possible to have an image positioned with respect
to the viewport for vertically overflowing content, whilst positioning
it with respect to the canvas for horizontally overflowing content.
Yes, and in fact pinning the image of the bottle to the viewport, not the
canvas, is what I intended. I wish the image to remain fixed relative to
the viewport even when the content is scrolled horizontally. Hence my use
of background-attachment:fixed.
What I am looking for is ideas on how to obscure that part of the content
that now overlays the unfaded part of the background image when the
content is horizontally scrolled. The appearance I seek is that the
bottle is over, not under, the horizontally scrolled content.
My code as it stands doesn't cut it, but more to the point, I am unsure
conceptually how to proceed. I could of course not set the bottle as a
background image and give it a higher z-index than the content, but then
it would not be fixed relative to the viewport. All ideas welcome (and
thanks, Spartanicus and Bill, for your observations thus far).
--
Warren Post
Santa Rosa de Copán, Honduras
http://srcopan.vze.com/