[thelist] CSS question..

Gary Bland Gary at star-chaser.com
Tue Oct 8 16:26:11 CDT 2002


rabbit at poorrabbit.com wrote:
> I'm finally working towards using CSS for my layout instead of
> table based layouts, and I've run across something I can't figure out.
>
> According to the CSS2 spec, the "position: fixed;" setting will cause
> an element uses that class to stay put, period. If you stick something
> on the top right of the screen, it stays there, even when scrolling.
>
> for example:
>
> DIV.foo {       right: 50px;
>         top: 10px;
>         position: fixed;
>         color: black;
>         width: 100px;
>         }
>
> If you look at: http://www.truthmagnet.com/v2/test.php in MOZILLA
> (at least in v1.1, or in the latest opera) you can see this behavior.
>
> The "HELLO" on the top right of the screen will stay put even if you
> scroll - you may have to shrink your window to see this effect.
>
> In explorer, this completely fails to work. In explorer, the Hello
> appears on the top left, and appears to be behaving as though
> position was set to "relative", which I THINK is the default.
>
> I've tried looking for alternate way of doing this with explorer, or
> even a way of convincing explorer to at least put stuff where it
> belongs, so that even if it doesn't stay put, it at least gets there
> to begin with, such that in mozilla it behaves as I wish, and that in
> explorer it will degrade gracefully - without having to use browser
> checking code.
>
> so much for "coding to standards".
>

IE windows does not support position:fixed except for backgrounds. You
have to use a Javascript hack to fix it.

HTH
Gary


--
Gary Bland
StarChaser Web Architecture
http://star-chaser.com
Building Tomorrow's World Today




More information about the thelist mailing list