...

View Full Version : Quick question



katie_lostsoul
07-09-2007, 04:02 PM
Hello,

I have a javascript menu on my homepage that floats down the page when the user scrolls. I'd like it to remain at the top when scrolling, and I was wondering if someone would be able to look at my code and tell me how that might be done? The url is: http://www.tombraiders.net/katie/index2.html

Thanks! :)

ahallicks
07-09-2007, 04:39 PM
I'm using FF2 and I can't see a javascript menu that floats down the page? I take it you mean the mean at the top of the screen with a black background?

What browser/platform does the menu scroll for you?

Looking at your code I'd say you need to seriously consider updating. It has no doctype, using very much deprecated tags and needs a good sort through! Try validating your page... you have 11 errors at the moment. Stick in a doctype, as standards suggest, and validate again. I can tell you there is going to be a lot wrong and a lot that needs sorting! If you need some help with this just ask!

Good luck!

katie_lostsoul
07-09-2007, 04:49 PM
It's right in the code, I'm such an idiot. It wast just a matter of changing one value, lol.

In any case, I'm currently in the process of re-doing the site, so in the meantime I'll be updating the 'old' one.

I re-did the other half of my site, http://www.tombraiders.net/katie/MyTombRaiderStories.html

It just takes awhile, but I'm getting there! :D

Arbitrator
07-09-2007, 06:35 PM
I have a javascript menu on my homepage that floats down the page when the user scrolls. I'd like it to remain at the top when scrolling, and I was wondering if someone would be able to look at my code and tell me how that might be done? The url is: http://www.tombraiders.net/katie/index2.html
#container { padding-top: 268px; }
#header { position: fixed; top: 0; }

Note that the above code also fixes the header image and may or may not work properly in Internet Explorer 7. Internet Explorer 6 doesn’t support position: fixed, so JavaScript or a CSS exploit much be used if this behavior is desired in that browser. You might want to also note that the image and menu take up a lot of valuable screen real‐estate at 1024×768 and lower and that it will probably cause overlap if the user uses their browser’s text zoom functionality.

If you just want the menu to be fixed, such that it scrolls up and stops at the top while the header image scrolls out of view, then this is probably a job for JavaScript. I’m not sure how you would do it, off the top of my head, though.

For context, I was looking at the second URI that you provided instead of the first, which I forgot to check. The process should be similar for that version of the Web site.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum