0

I am trying implement an scrolling header. I have a background image and when I load the page the image doesnt actually scroll its static...can someone help me please?

The code also has a gallery where the photos appear and dissapear...but the header doesnt scroll (maybe the .css is conflicting or the jqueries are)..where am i going wrong??

I cant seem to post my code here but its on http://forums.asp.net/p/1644211/4261584.aspx#4261584

any ideas please?

Visual Basic .Net
  • 225
  • 1
  • 3
  • 8
  • To post code here you need to highlight the pasted code and press `Ctrl+k` or click the `{ }` button on the toolbar. – gen_Eric Jan 19 '11 at 17:28
  • what browser are you testing this on. What version of jQuery are you using. BackgroundPosition is not supported on all browsers in all versions of jQuery. – Stuart Burrows Jan 19 '11 at 17:53
  • The thing is if I run the code for the Gallery View on its own it works. If I run the code for the Header on its own it works. Just went I try and combine it, it doesnt work. – Visual Basic .Net Jan 19 '11 at 18:02

1 Answers1

0

I'm not quite sure if I understand what you are trying to do. When you scroll down/up the page do you want your background always to remain where it is (i.e. not scroll with the rest of the content)? In this case you should specify the "background-attachment" CSS property as "fixed", not "scroll" (by the way "scroll" is the default). This is usually, though not always, used for the background of the BODY of the document.

However, I suspect you want the DIV itself to stay at the top of the page, and not move when you scroll. If that is the case see the answer here:

How do you create non scrolling div at the top of an HTML page without two sets of scroll bars

Regards Neil

Community
  • 1
  • 1
Neil
  • 3,229
  • 1
  • 17
  • 15