View Full Version : DIVS again...


DTT
07-18-2003, 04:00 PM
Well, it's been a while, but I'm lost again. ^^` What I want to do is put a table inside of a div, but I want the div (300*200) to be in the bottom left corner of the screen, no matter what size the window. I don't quite remember how to do that one.

kittycat
07-18-2003, 04:16 PM
style="position:absolute; left: 0px; bottom: 0px;"

That'll keep it at the bottom corner when the page is loaded, it won't scroll down with the screen though.

christiandude03
07-18-2003, 04:21 PM
I don't know if this is the easiest way to do it, but it works in both Mozilla 1.4 and IE6:


<html>
<head>
<script type="text/javascript"><!--
function setPosition() {
topPos = document.body.clientHeight - 200;
document.getElementById('mydiv').style.top = topPos + "px";
}
--></script>
</head>
<body onLoad="setPosition()" onResize="setPosition()">

<div id="mydiv" style="position:absolute;left:0px;width:300px;height:200p x;background-color:#eeeeee;">

</div>

</body>
</html>

christiandude03
07-18-2003, 04:27 PM
Ok so maybe my way wasn't the easiest :)

DTT
07-18-2003, 05:57 PM
Thanx alot. ^^ I thought it was something like that... Oo` Hehe! Here, have some joy! *waves joy to Kitty and Christian*