A demo of the type of menu can be seen here: http://www.jtricks.com/javascript/navigation/fixed_menu.html

Main problem is, when the screen is scrolled horizontally, the menu followed--this isn't a desired behaviour.

The behaviour I would like to achieve is the same as seen on quirks-mode: http://www.quirksmode.org/compatibility.html

(Click on "show site navigation"). You will notice that it does follow the screen vertically, but not horizontally (you may have to resize your browser window so that the site is small enough to require horizontal scrolling).

I'm assuming some sort of Javascript workaround may need to be employed, which I'm not entirely against.

2 answers

0
points

I don't see what you're talking about at all, but fixed means fixed along both axes, not just one or the other. What browsers do in "quirksmode" is generally undefined and unpredictable, so you should never assume that everyone's going to see the same thing you do when invoking it.

Answered almost 9 years ago by Nathan Duran
  • "What browsers do in "quirksmode" is generally undefined and unpredictable, so you should never assume that everyone's going to see the same thing you do when invoking it". - not in quirks mode- at quirks mode the site... ;o) Tony Crockford almost 9 years ago
Kau-Boy 110
0
points

On a "position: fixed" you cannot prevent it from following the screen. But of you use a "position: absolute" instead (as seen on quirksmode) the element will not follow the screen. The "stick at the top when scrolling down" is done with JS.

Answered almost 9 years ago by Kau-Boy
  • So I guess my question then becomes: What should the JS look like to achieve the said effect? Trioke almost 9 years ago