PDA

View Full Version : CSS box at the bottom of the screen?


Mariamus
05-30-2005, 03:33 PM
I've tried just about anything in my stupid css reference manual. and I can't figure out what i'm supposed to do now.
I need a box that stays at the bottom of the browserwindow at any time.

you can see the site here: http://www.mariamus.dk/homesite/

here's my css and HTML code.

html->

<html>
<head>
<title>Mariamus.dk</title>
<link rel="STYLESHEET" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#b6b6c6" scroll="auto" link="#OOOOOO" vlink="#OOOOOO" alink="#OOOOOO"> <font color="#OOOOOO">
<div align="center">
<div id="mainfelt">
<bgcolor="#FFFFFF">


<div id="top">
<div align="left">
<img src="homesite.png" width="164" height="50" alt="">
<font size="-1">


<div id="box">
<div align="left">
<font size="-1">
test


<div id="bottom">
<div align="left">
<font size="-1">
test


</font>
</div>
</div>
</div>


</body>
</html>


stylesheet ->


#mainfelt {
position: relative;
top: 0px;
left: 0px;
background-color: #b6b6c6;
}

#background {
position: absolute;
top: 0px;
left: 0px;
z-index: 0;
}

#top {
position: relative;
width: 100%;
top: 0px;
height: 50px;
font-family: "verdana";
background-color: #525268;
}

#box {
position: relative;
width: 100%;
top: 50px;
font-family: "verdana";
background-color: #b6b6c7;
}

#bottom {
width: 100%;
position: relative;
bottom: 0px;
font-family: "verdana";
background: #525268;
}


img {
behavior: url("pngbehavior.htc");
}

ADM
05-31-2005, 02:21 AM
http://www.webmasterworld.com/forum83/268.htm

That should help you out..

basically theres no really good way at doing it.

Mariamus
05-31-2005, 11:55 AM
I can't see it. it asks me to subscribe.

ADM
05-31-2005, 12:43 PM
It shouldn't do.. I don't suscribe there nor am I registered and it lets me view it fine.

Usurper
06-04-2005, 12:31 AM
Been tinkering with the code.

I see 9 <div>s and only 3 </div>s. That might be part of the trouble. Get those sorted out the way they should be (I could make guesses...) and I'm sure one of us could figure out something cross-browser that'd work.

And yeah, ADM's site is asking me to register and/or subscribe as well.

Might be worth choosing a doctype as well, since that'll affect how the page is rendered by some browsers. Since you're using font tags (me cringes) I assume that'd be html 4.x transitional.

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

ikkejw
06-05-2005, 07:24 AM
Mariamus said:
I can't see it. it asks me to subscribe.

********? http://forums.3drealms.com/ubbthreads/images/graemlins/rolleyes.gif

the pineapplehead
06-27-2005, 06:42 AM
You need a doctype.

Position:fixed; will keep it where you want regardless of screen widht/height . . . . however, it doesn't work in explorer.

Google for 'faking position:fixed'