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 7776005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:46:03+00:00 2026-06-01T17:46:03+00:00

I’m working on a site where I have to use a fixed DIV for

  • 0

I’m working on a site where I have to use a fixed DIV for the menu.
http://www.atelier2architecten.nl/index2.php

I’m trying to find a way to let the fixed div scroll horizontal.
Because, when je make your browser window smaller you can’t click the buttons that are outside te window.

I found some jquery solution. But those include animation. My client doesn’t want that. it has to stay fixed.

I also found a great solution on this site But it doens’t work when i use a DOC TYPE in my code. ( I need that for my CSS )

This is the code that doens’t work with any DOC TYPE:

function hscrollbar() {

var left = 
    /* window.pageXOffset should work for most recent browsers: */
    window.pageXOffset ? window.pageXOffset : 
    /* If it DOESN'T, let's try this: */
    document.documentElement.scrollLeft ? document.documentElement.scrollLeft : 
    /* And if THAT didn't work: */
    document.body.scrollLeft;
/* Now that we have the horizontal scroll position, set #footpanel's left 
   position to NEGATIVE the value, so it APPEARS to follow the scroll: */
document.getElementById('menu').style.left = -left;
}
window.onscroll = hscrollbar; /* Call the function when the user scrolls */
window.onresize = hscrollbar; /* Call the function when the window resizes */

I hope someone can help me with this. When i don’t use a DOC TYPE it works perfectly on google chrome. But IE, as always, is the problem.

Greeting Tobias

  • 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-01T17:46:04+00:00Added an answer on June 1, 2026 at 5:46 pm

    Have you tried this:

    $(window).scroll(function () {
       $('#menu').css('left', -($(window).scrollLeft()));
    });
    

    Tested in FF and Chrome.

    P.S. Needs jQuery

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

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.