Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fixed Position

0 views
Skip to first unread message

Valérie Chevrier

unread,
Feb 19, 2001, 10:40:09 AM2/19/01
to
Is there a way using css (or any other method) to fix the position of an
element, a button in this case, on the screen. In this case the users can
scroll but they always want the buttons visible. One option is to use a
frameset but I'd like to avoid this if possible.

One caveat: My users are using IE 4 and IE5. I realize that's not the scope
of this newsgroup but it was the closest one I could find.

Thanks,

Jason


Brett Merkey

unread,
Feb 21, 2001, 11:04:10 AM2/21/01
to
"Valérie Chevrier" <chev...@inac.gc.ca> wrote in message
news:eUDv$oomAHA.1356@tkmsftngp04...

Position: fixed
is not implemented in IE.

For IE5 and newer, you can use behaviors in the CSS to fix positioning.
Example:
top: expression(document.body.scrollTop +
document.body.clientHeight - offsetHeight - 10);
left: expression(document.body.scrollLeft +
document.body.clientWidth - offsetWidth - 10);

will create a non-moving area at the bottom right of the screen.

Brett
http://home.earthlink.net/~bmerkey/fall99.htm

Huynh Kang

unread,
Feb 26, 2001, 1:27:22 PM2/26/01
to
<html>
<head>
<style type="text/css">
#fixedElement {position: relative; top: document.body.scrollTop;
z-index: 1;}
</style>
</head>

<body onscroll="scrollPage();">

<div id="fixedElement">
Any objects within these div tags will scroll with the page.
<p>
<input type="button" value="Click Me">
</div>

Add things here to make a long page.

</body>

<script language="JScript">
function scrollPage(){
fixedElement.style.pixelTop = document.body.scrollTop;
}
</script>
</html>

Works on IE5 & up, but don't know if it works on IE4.

"Valérie Chevrier" <chev...@inac.gc.ca> wrote in message
news:eUDv$oomAHA.1356@tkmsftngp04...

0 new messages