Philippe Combes wrote:
> One year ago, "Georg" replied with a link to one of his own pages, 
> where a menu behaves a bit as I would like it for mine, even if on 
> the right side: http://www.gunlaug.no/contents/toc_7a.html
> 
> The difference is that I would like my menu to scroll horizontally 
> just as if it was defined with "position: absolute;". Say, position 
> fixed on y-axis and absolute on x-axis.

The effect you're after can not be easily achieved with CSS alone as of
today, since an element can't really be given two different references -
one to the browser-window (fixed) and one to the page (absolute).

My example does actually behave as you want, but _only_ in IE6 and
below, and _only_ when javascript-support is on.

IE6 and older don't support position: fixed at all, and is therefore
given the fix described here...
<http://www.gunlaug.no/contents/wd_additions_15.html>
...where "fixed" elements are "absolute positioned" horizontally
relative to the page, and an IE-expression dynamically feeds them
vertical offset-position based on where the page-top is relative to the
window when the page is scrolled.

> I tried to find out my way amongst all the CSS code associated to 
> Georg's page, to see if I was able to modify something to get the 
> desired behaviour, but I quickly got lost: I have started to learn 
> and work with CSS 10 days ago...

No surprise you got lost then, as neither my stylesheets nor my markup
is particularly "beginner-friendly" :-)

My solution gets around the problem with "position: fixed" lining up
correctly in "max-width" restricted pages - by using nested elements and
complex styling, but the "overlapping on narrow windows" problem is
unsolved - except in IE6 and older. Expressions never made it into CSS,
and no alternative to them have made it either - at least not yet.



Consequently: the effect you're after can be made to work (somewhat) by
having a script inject new position-values for the "fixed" element based
on page's position and dimensions relative to the window / viewport.

There is an alternative method: reverse the IE6 solution described here...
<http://www.gunlaug.no/contents/wd_additions_17.html>
...to work in all browsers. Some sites use such a method.
However, that method messes up the back-button functionality under
certain conditions in existing IE/win versions, so I haven't taken it
any further.


regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to