473,473 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can I prevent an item from scrolling with the page?

Hello all,

Can I prevent something, say a <div>, from scrolling when the page is
scrolled? I know that with CSS, "background-attach: fixed" will anchor
the background element and prevent it from scrolling.

Is there a similar html/css variable or command that I can apply to a
DIV, TABLE, or IMG?

Viken K.

Dec 7 '05 #1
4 14918
Viken Karaguesian wrote:
Can I prevent something, say a <div>, from scrolling when the page is
scrolled? I know that with CSS, "background-attach: fixed" will anchor
the background element and prevent it from scrolling.

Is there a similar html/css variable or command that I can apply to a
DIV, TABLE, or IMG?


position: fixed

Supported by CSS 2 browsers.

JavaScript workarounds exist for MSIE.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Dec 7 '05 #2
Thanks for the reply.

Let me guess: IE6 is *not* a CSS 2 Browser, right? Can you point me in
the direction of where I can find some of these javascript workarounds?
Thanks.

Dec 8 '05 #3
Viken Karaguesian wrote:
Let me guess: IE6 is *not* a CSS 2 Browser, right? Can you point me in
the direction of where I can find some of these javascript workarounds?


As I don't remember any off the top of my head - google.com

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Dec 8 '05 #4

David Dorward wrote:
Viken Karaguesian wrote:
Let me guess: IE6 is *not* a CSS 2 Browser, right? Can you point me in
the direction of where I can find some of these javascript workarounds?


As I don't remember any off the top of my head - google.com


Try Quirksmode: http://www.quirksmode.org

Dec 8 '05 #5

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

Similar topics

7
by: JimO | last post by:
I teach HS computers and one of my kids has a web site with a textbox of info that the user can scroll down and read. The problem is that users can also enter text into it. Is there a way, or a...
14
by: Dave | last post by:
My web site is not particularly theme-based, but it contains an Art Gallery I'd like to display in a different perspective. I would like to horizontally scroll it, rather than vertically - as if...
1
by: Aravind | last post by:
Hi folks. I have a form that has a form header and form footer, which has a few command buttons. When I open the form, I have to scroll the form from left to right to view my data. The thing is,...
0
by: Steve | last post by:
The treeview has this habit of scrolling when you change the tree's selection so that the selected item is visible. 9 times out of 10 this is the behavior that you'd want, but what do I do to...
1
by: Tom Wild | last post by:
Hi I have a listbox on a webform which has Autopostback set to true. When the user selects an item in the listbox and the form reloads, the listbox scrolls to put the selected item as high up...
5
by: Jim Bayers | last post by:
I have a simple page, all that's on it is a datagrid. The datagrid is populated on page_load when it is bound to a datareader. The problem is: when a user refreshes the page, new records are...
2
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a...
0
by: toddw607 | last post by:
I have a datagrid in ASP.NET using VB.NET code which, when loaded it takes a parameter from the URL called DexNumb. When this parameter is brought it, it highlights the entire row Red and makes it...
6
by: Gustaf | last post by:
I'm working on a code generator for documentation of VBA projects. It outputs HTML docs, including simple JS. I don't have much experience with JS however, so I need some help with this sample...
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...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.