Topic: CSS positioning question

Is it possible to position a <div> so that it always "follows" the bottom edge of the browser window? I have temporarily solved it with an ugly JavaScript hack, but I would very much like to avoid any type of active scripting. The question is not related to PunBB, so fear not :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: CSS positioning question

Using CSS with: "position: absolute;" and "bottom:0; left:0" or something like that should work I think.

Edit: ...and maybe in english instead :)

Re: CSS positioning question

Well, that works, but it doesn't follow the bottom edge when you scroll down the page. However, I have yet to see a JavaScript that handles that, so your solution is at least better than my current :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4

Re: CSS positioning question

http://www.alistapart.com/articles/footers/

This is a nice footer article, it doesn't exactly cover what you want though.

5

Re: CSS positioning question

Rickard, that is an unfortunate not well implemented feature of CSS, it should work with position: fixed, but I still have to see that work somewhere.

If you find out how, please let me know, I am also strongly interested in that. Never managed to do it solely with css, but would certainly be neater.

fixed 
The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference. In the case of continuous media, the box is fixed with respect to the viewport (and doesn't move when scrolled). In the case of paged media, the box is fixed with respect to the page, even if that page is seen through a viewport (in the case of a print-preview, for example). Authors may wish to specify 'fixed' in a media-dependent way. For instance, an author may want a box to remain at the top of the viewport on the screen, but not at the top of each printed page. The two specifications may be separated by using an @media rule, as in: 
Example(s):


   
@media screen { 
  H1#first { position: fixed } 
}
@media print { 
  H1#first { position: static }
}

6

Re: CSS positioning question

MarcB wrote:

Rickard, that is an unfortunate not well implemented feature of CSS, it should work with position: fixed, but I still have to see that work somewhere.

Try viewing this in Firefox.

Or you can use this tag soup with IE ;)

7

Re: CSS positioning question

Yay, I luv u!!!!!
overflow-y: hidden;
I would have never figured out that one. Now let's see if I can still use it. I'd have killed for that a few months ago.

And when I said not implemented, I meant not implemented in MSIE, that is. I know they say it's just buggy, but... I never saw it work, so to me it's not implemented wink

Cheers!