[thelist] position:fixed [was: http_user_agent]

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Mar 21 04:08:00 CST 2002


>
>I wholeheartedly agree that checking the userAgent is troublesome and try
>to avoid it ... but I am in a *really* _wonky_ meddle:

While browser detects in JavaScripts are the worst coding possible, in CSS
they are sometimes (regrettably) necessary.

>A client wants a frames effect and a non-scrolling frame has to sit
>at the _bottom_ of the window. I've figured out how to do this for IE
>5+ Win, IE 5 Mac and NS 6 but it's three different ways which uses
>just three or four lines of DHTML (which is still more than I'd
>ideally like to use).
>
>So I'd like to use a capability check to distinguish between:
>
>IE 5 Mac AND IE 5+ Win (throw in Opera 5 for me if you're feeling
>ambitious) ... but can think of or find a way to do it other that
>examining navigator.platform and navigator.userAgent ... Is there a
>way?

No. I tried an idea, didn't work.

>And 2nd question:
>
>In Opera, how can I find the window height, and set a positioned div
>to hug the bottom of the window and have the rest of the page scroll?
>While using a minimum of DHTML ... I don't want to be constantly
>checking where the visitor has scrolled to.
>
>I'm OK with penalizing people for using NS 4 by showing them
>something different, but Opera's a pretty nifty browser and I'd l,ike
>to get this to work for it.

Maybe

.fixedstuff {position: fixed;
  bottom : 10px;}

This should place the fixed layer 10px from the bottom of the page.

ppk

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx




More information about the thelist mailing list