Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9223663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:07:34+00:00 2026-06-18T04:07:34+00:00

I’m developing a website that scrolls to the side and I was using fixed

  • 0

I’m developing a website that scrolls to the side and I was using fixed position to keep menu on top, but I realize when I scroll down, the menu will also scroll down. I’m wondering if there’s a way to keep the menu on top when I scroll to the side, but it doesn’t go down when I scroll down.

So I tried using absolute position relative to body, but that doesn’t keep the menu on top when I side scroll.

#menu
{   
background          : url(images/banner5.gif) no-repeat;
height              : 60px;
margin-top          : 20px;
position            : absolute; 
left                : 450px;
}

#menuFloat li
{   
display             : inline;
float               : left; 
padding             : 8px 20px 0px 30px;
}

#menuFloat li a
{   
    color               : #9d0c10;
    font-family         : Erato;
    font-size           : 12pt;
    font-style          : italic;
    text-decoration     : none; 
}

$(document).ready(function() {
 $("#menuFloat a").bind("click",function(event){ event.preventDefault();
  var target = $(this).attr("href");
   $("html, body").stop().animate({ scrollLeft: $(target).offset().left, scrollTop:    $(target).offset().top }, 1200);
 }); }); 

<div id="menu">
    <ul id="menuFloat">
        <li><a class="nav1" href="#nav1">Home</a></li>
        <li><a class="nav2" href="#nav2">About Us</a></li>
        <li><a class="nav3" href="#nav3">Members</a></li>
        <li><a class="nav4" href="#nav4">Events</a></li>
        <li><a class="nav5" href="#nav5">Media</a></li>
        <li><a class="nav6" href="#nav6">Contact Us</a></li>    
    </ul>
</div>

The first part is the CSS for the menu, second part is jquery code for how it can slide horizontally, and third part is html for the menu.

If you’re confused of my problem, check here: http://permika-montreal.tk/new.php
When you scroll down, you’ll see the menu does too and I’d like that not to happen.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:07:35+00:00Added an answer on June 18, 2026 at 4:07 am

    Look here

    #menu
    {   
    background          : url(images/banner5.gif) no-repeat;
    height              : 60px;
    top                 : 20px;
    position            : absolute; 
    left                : 50px;
    }
    

    Jquery

    $(document).ready(function(){
    
     var lastScrollLeft = 0;
    $(window).scroll(function() {
        var documentScrollLeft = $(document).scrollLeft();
        if (lastScrollLeft != documentScrollLeft) {
            console.log('scroll x');
            lastScrollLeft = documentScrollLeft;
            $("#menu").css("left", lastScrollLeft+50);
    
        }
    });   
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am using JSon response to parse title,date content and thumbnail images and place
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.