Re: CSS-positioning with top and bottom
- From: "bert_emme" <bertanimauro@xxxxxxxxx>
- Date: 3 Sep 2006 06:55:22 -0700
Hi, i have find a solution at your problem with javascript and css:
These is the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Other time </TITLE>
<style type="text/css">
*{
margin:0;
padding:0;
}
#header{
height:72px;
width:100%;
background-color:#ccc;
}
#line{
position:absolute;
left:10%;
top:72px;
width:1%;
background:url(shadow_right.png) repeat-y;
}
#content{
position:relative;
left:11%;
width:89%;
}
#content #padding{
padding:5px;
}
#footer{
height:20px;
background-color:#ccc;
text-align:center;}
</style>
<script>
function setHeight(line,content){
absolute = getElemRefs(line);
relative = getElemRefs(content);
absolute.css.height = relative.offsetHeight + 'px';
}
function getElemRefs(id) {
var el = (document.getElementById)? document.getElementById(id):
(document.all)? document.all[id]: (document.layers)?
document.layers[id]: null;
if (el) el.css = (el.style)? el.style: el;
return el;
}
</script>
</HEAD>
<BODY onload="setHeight('line','content')">
<div id="header">TITLE</div>
<div id="line"></div>
<div id="content">
<div id="padding">Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text Here there is some text
Here there is some text Here there is some text </div>
</div>
<div id="footer">Made by Mauro Bertani</div>
</BODY>
</HTML>
.
- Prev by Date: Re: Any CSS experts out there using IE on the Mac?
- Next by Date: Re: spacing and positiong: lists (ul li)
- Previous by thread: Re: CSS-positioning with top and bottom
- Next by thread: Re: Vertical alignment of text within a DIV
- Index(es):
Relevant Pages
|