Re: CSS-positioning with top and bottom



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>

.



Relevant Pages

  • Re: Strange cell colours
    ... whether it is supposed to be HTML or XHTML. ... particular version of any particular browser would do with it. ... Which has no CSS, which is what you were complaining about. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Web User Controls And StyleSheets
    ... When I link to a css file anywhere within a web user control (ascx) it works. ... css styles are aplied to the html in the ascx. ... The link is not in the .aspx page's head tags! ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: drop down
    ... concept of style information that can be separated from the html. ... A quick addition of some css to your table starts to make it take ... First tidy up would be to put all the styles in the head of your ...
    (alt.html)
  • Re: Creating Java/DHTML Vertical Navigation Menu in FrontPage
    ... <html xmlns="http://www.w3.org/1999/xhtml"</a>; xml:lang="en"> ... //Specify whether at least one header should be ... .urbangreymenu .headerbar a{ ...
    (microsoft.public.frontpage.programming)
  • Re: Css Ordered List problem FF and IE
    ... ok first of all stop using internal style sheets. ... copypasta all your css from your style.css document and make changes ...
    (alt.html)