Good morning everyone,
I need a way to place an item, say a div or an image over a page. I just saw an example similar to what I am looking for. There is a form at the bottom right corner of the Sitepoint home page. It moves with the window size and does not stay behind.
I tried using a simple CSS only method. By making a div 100 percent wide, absolute positioned and then placed an image in the background. The imaged is positioned to the top right.
This works well but with one problem, when the window is re-sized and you scroll using the horizontal scroll bar the image is left behind in the window.
I am thinking this is only possible with JavaScript.
What are your thoughts?
Your description sounds odd. Do you have a working example? From what you describe, I’d expect the image to follow the div around. We need to see some code at least.
That keeps the red box in the top right corner (where you seem to want it). BUT … if the viewport bets smaller than the 960px of the content box and then you scroll, the box will still stay put. But that’s a rare situation. If you remove this