![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
At <http://snow.prohosting.com/srcopan/dry/test.es.html>, you will see that the background image runs down the left margin. The right hand side of it is faded, watermark style, but it is one single image. my intention is for the header and text to appear to the right of the unfaded portion of the image, and on top of the watermarked portion. At most viewport widths it works as intended. However, if the viewport is narrowed enough to require horizontal scrolling, the header and text slide over the background image. |
|
This does not surprise me (it's a _background_ image, after all) but it is not my intention. |
#3
| |||
| |||
|
|
I'm not seeing that, what browser are you seeing this with? Can you provide a screenshot? |
#4
| |||
| |||
|
|
Warren Post <wpost (AT) hondutel (DOT) hn> wrote: ...if the viewport is narrowed enough to require horizontal scrolling, the header and text slide over the background image. I presume you mean over the unfaded part of the background image? |
|
This does not surprise me (it's a _background_ image, after all) but it is not my intention. I'm not seeing that, what browser are you seeing this with? Can you provide a screenshot? |
#5
| |||
| |||
|
|
In IE the two (missing) images on the right eventually get pushed over onto the unfaded background. Is that what you are talking about, Warren? |
#6
| |||
| |||
|
|
Then I scroll horizontally in the second screenshot |
#7
| |||
| |||
|
|
Warren Post <wpost (AT) hondutel (DOT) hn> wrote: 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. |
#8
| |||
| |||
|
|
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. |
#9
| |||
| |||
|
|
...This could be done using a position:fixed element with the unmasked half of the bottle as a background, but IE doesn't support position:fixed, and it would result in partially masked content when scrolled horizontally, text would become unreadable. Best just let the bottle scroll. |
![]() |
| Thread Tools | |
| Display Modes | |
| |