Basically my goal here is to get a nice skin using 100% of the browser window with the footer stuck to the bottom.
I've got footerstickalt working pretty well to get just this effect. I start running into problems like if I want to put a background image on my contentpane, it won't repeat down to the bottom of the page. its either make a page background image or sort something out using background-color's only, something I don't want to do.
So I got to looking to using javascript to resize my contentarea of the skin (ie everything but header and footer) I put some code in <body onload="script.js> in a regular html file and it works quite well, gets the browser height, minuses the header and footer height, and resizes the content area to that.
So I tried to do this in DNN - using the onload in body is out, but its easy enough to add javascript into the head of pages etc which I have done fine. so my page is loading javascript no problem.
the problem is firing that javascript on the window.onload event. My code will display alert messages when the page is loaded, but it just will not resize my <div> I even put the same javascript functions in a button and clicked it - the effect is that it will resize my content div for a split second before it magically resizes back to what it was - I assume this is DNN's doing somehow?
the basic javascript being run is:
function alertSize() {
window. Height = ' + myHeight ); //its calculating myheight just fine - the alert displays
var el = document.getElementById("content");
el.style.height = (myHeight-130) + 'px';
}
Method I tried to use to run it on pageload:
if (window.addEventListener){
window.addEventListener("load", alertSize(), false);
} else if (window.attachEvent){
window.attachEvent ("onload", alertSize())
}
or plain old:
window.onload
anyone had any success getting something like this to work? I'd be happy to abandon javascript altogether...