473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Image that scrolls with the page?

Hi

How do I make an image stay eg at the top left of the page even if the
viewer is scrolling down a long page?

Ugly effect I know but I have a particular use for it.

TIA

Nicholas
Jul 23 '05 #1
2 2628
"Nicholas" <ni******@nospamhere.rs> wrote:
How do I make an image stay eg at the top left of the page even if the
viewer is scrolling down a long page?


Background or foreground image?

If it's a background then background-attachment: fixed;
If it's a foreground image the position: fixed; (not supported by IE,
unless some JavaScript hackery is used).

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 23 '05 #2
There are a couple of solutions:
1) Put your scrollable content in a DIV positioned using CSS and use the
"overflow" property to make the box scrollable independently (potential
problems with the Opera browser though).
2) Use CSS to set the image as a background-image with
background-attachment: fixed (probably the best solution.

--
####################
## PH, London
####################
"Nicholas" <ni******@nospamhere.rs> wrote in message
news:cs*******************@news.demon.co.uk...
Hi

How do I make an image stay eg at the top left of the page even if the
viewer is scrolling down a long page?

Ugly effect I know but I have a particular use for it.

TIA

Nicholas

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tim | last post by:
Hope someone in the big wide world can help... What I want to do is have an image slideshow which automatically scrolls through a series of images very fast, then pauses when you move your mouse...
5
by: Roger Shrubber | last post by:
I have a page with images that the user can drag from one frame to another. I need them to see a "ghost image" of the image they are dragging, while the original stays put. I use the onmousemove...
2
by: George | last post by:
Hi, The code below comes directly from http://www.dynamicdrive.com. It does exactly half of what I'd like it to do. The other half is this: I'd like the image block of the changing images to...
0
by: dotnetkumar | last post by:
i ve got a almost the same prob but the other way. i ve created a default page with header+menu, an iframe and a footer. Now if i select an item in the menu the page displayed inside the iframe has...
9
by: Andy Baxter | last post by:
hello, I'm writing a panoramic image viewer in html / javascript. The idea is I have a div with two identical panoramic photographs embedded in it. The clipping on the div is set to make it a...
10
by: Edwin Knoppert | last post by:
I have an asp.net imagebutton with a clickevent. I have enclosed an anchor around the image and a small text. If i click the image the event is executed (while the href of the anchor shows in the...
4
by: huntingseasonson | last post by:
Hi, I have set up the following page http://gertrudischale.com/cgi/ viewart.pl?lang=en&i=22 to scroll in the same direction one moves the mouse. This works fine -except in IE- where the image tends...
2
tpgames
by: tpgames | last post by:
You know how some pages has a stationary image, but the text can move over the image when the user scrolls down the page? I don't know what to put in the search box to find this code. I keep finding...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.