Divide the browser window into upper and lower divs. The height of the upper div is 300px, and the remaining area is given to the lower div. Can it be done with css? I will only use js to first calculate the height of the external window, and then subtract the upper div. The height of the div is the height of the lower div.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style>html,body{height:100%;margin:0;padding:0;}</style></head><body><div id="top" style="height:80px;background:#f00; position:absolute; top:0; width:100%"></div><div id="main" style="height:100%;background:#000;margin-top:0!important; margin-top:-80px"></div></body></html>