Forum Moderators: open

Message Too Old, No Replies

Layers - a static position on screen, even when scrolling

Holding Place

         

chris_f

10:28 am on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am looking to develop a number of sites. All of which will have one thing in common. They will have a small gif in the bottom right of the screen. This gif will link to my main site. My question is. How do I use a layer so that it stays in the bottom right hand corner of the screen even when I scroll?

Chris

nwilson

12:01 pm on May 18, 2002 (gmt 0)



I'm not one 100% as I've never done it but in theory you should be able to specify it as

#your_link_div {
position: fixed;
left: 100px
top: 100px
}

It will be easiest to do if you have it on the left.

Nick

chris_f

12:05 pm on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Nick,

I'll give it a go.

papabaer

4:35 pm on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The CSS declaration, position:fixed; will one day be a tremendous tool for page designers; Mozilla, NS6 and Opera all render "fixed" positioning. Unfortunately, IE only allows CSS fixed-positioning for "background-images" and not for active page elements.

Here is the link to WC3's Visual Formatting section: [w3.org...]

DHTML can supply a solution, though here too, you need to be aware of cross-browser compatibility.

nwilson

5:53 pm on May 18, 2002 (gmt 0)



Yes.
A different solution would be best, for example: inclued a footer at the bottom of each pages content containing this.

Nick

antidote

9:43 pm on May 18, 2002 (gmt 0)

10+ Year Member



You could resort to frames.

tedster

10:26 pm on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree that another solution is the best way.

It's true that NN6 nominally supports position:fixed, but it does so with an annoying amount of re-drawing and flicker in many cases.

A DHTML solution can be worked out, but the various browsers will require detailed browser sniffing and several different scripts. Even when you've got it technically correct and cross-browser, you may not like what you see. I've played with this a lot, and I'm not pleased with anything so far.

Displaying information in a static screen position is a design concept (it could be very elegant!) whose time has not yet come. It's one thing for the W3C to write their recommendations - but it's a completely different thing to have dependable browser support.

rcjordan

11:03 pm on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>dhtml

I once worked on this quite a bit. As I recall, of all the watermark/logo scripts I tried, this one was my favorite. It has a few options, as well as a choice of window corner. It's relatively liteweight, and cross-browser.

[dynamicdrive.com...]

papabaer

11:05 pm on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tedster's right, this is one particular bit of CSS that could be... and eventually will be, so sweet. But, unfortunately, not for anytime soon.

chris_f

9:58 am on May 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks alot guys. I'll look into what you've said. I'll probably look at another method.