Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Quick question

  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Quick question

    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!

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    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!
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #3
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    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/MyT...erStories.html

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

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,315
    Thanks
    29
    Thanked 279 Times in 273 Posts
    Quote Originally Posted by katie_lostsoul View Post
    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
    Code:
    #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.

    Edit: 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.
    Last edited by Arbitrator; 07-09-2007 at 06:41 PM. Reason: See the post.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •