For guidance in the right direction, consider utilizing JavaScript (you may want to include a tag) to identify the window's height.
// To ensure cross-browser compatibility, use window.innerHeight and document.body.clientHeight.
function getHeight() {
return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null;
}
Next, subtract the height of your main div.
var maindiv=500; // this represents the total height of the main div with content
var windowHeight = getHeight();
var displayHeight = windowHeight - maindiv;
Then, divide by 2 to determine the top and bottom margins.
var topMargin = displayHeight / 2;
Finally, apply a 'margin-top' to the main div.
document.getElementById('wrap').style.marginTop = topMargin;