I'm not sure if this is possible with css, maybe. I solved a similar problem with javascript:
window.top.innerHeight;
gets the available height, excludes the menu, etc. Borner. See how I did it at the height, my problem was that the footer should be at the bottom, even if the content is empty →
<!doctype html> <html> <head> <meta charset="utf-8"> <title>C-Driver Manager</title> <meta name="keywords" content="Aygit,Device,Driver,Surucu,Download,Indir,yedekle,Unknown,Bilinmeyen,Backup,Back-up,stuurprogramma,apparaat,windows,w7,w8,w10,multilanguage,tool,free,gratis,ucretsiz"> <meta name="description" content="Windows 7/8/10 Device indentify, Driver backup, Driver info"> <link rel="stylesheet" type="text/css" href="main.css"> <link rel="icon" href="images/favicon.ico"> </head> <body onResize="resizecontainer();"> <div class="divtop"> <div class="divtopcontainer"> <div class="divlogo"> </div> <div class="divHmenu"> <style> .mnuHorizontal { list-style:none; } .mnuHorizontal li { float:left; } .mnuHorizontal .activemnu a,.mnuHorizontal li a:hover { background:#00B7EF; border-radius:5px; color:white; } .mnuHorizontal li a { display:inline-block; text-decoration:none; padding:5px 12px; text-align:center; font-weight:bold; color:#020042; } </style> <ul class="mnuHorizontal"> <li id="index.php"><a href="index.php">HOME</a></li> <li id="features.php"><a href="features.php">FEATURES</a></li> <li id="download.php" class="activemnu"><a href="download.php">DOWNLOAD</a></li> <li id="contact.php"><a href="contact.php">CONTACT</a></li> </ul> </div> </div> </div> <div class="divblueline"></div> <div class="divcontainer"> <div style="float:left"> <h2>What is C-Driver Manager</h2> C-Driver Manager is a simple tool that; <ul> <li>displays information about your devices</li> <li>identify unrecognized devices by windows</li> <li>Backups your devices driver</li> </ul> <h2>Why C-Driver Manager?</h2> <ul> <li>No installation needed</li> <li>No adware</li> <li>No spyware</li> <li>Absolutely freeware</li> </ul> </div> <div> <img alt="" src="images/devmgr5.jpg" height="430" width="700"> </div> </div> <div class="divblueline"></div> <div class="divbottom"> <div id="chmx"> </div> </div> </body> <script> for (i=0;i<document.getElementsByClassName('mnuHorizontal').item(0).children.length; i++) { if (document.getElementsByClassName('mnuHorizontal').item(0).children[i].id == "index.php") { document.getElementsByClassName('mnuHorizontal').item(0).children[i].className = 'activemnu'; } else { document.getElementsByClassName('mnuHorizontal').item(0).children[i].className = ''; } } resizecontainer(); function resizecontainer() { avh = window.top.innerHeight; dbh = document.getElementsByClassName('divbottom').length * document.getElementsByClassName('divbottom').item(0).clientHeight; dbt = document.getElementsByClassName('divtop').length * document.getElementsByClassName('divtop').item(0).clientHeight; dbbl = document.getElementsByClassName('divblueline').length * document.getElementsByClassName('divblueline').item(0).clientHeight; decrh = dbh + dbt + dbbl; document.getElementsByClassName('divcontainer').item(0).style.minHeight = (avh - decrh) + 'px'; } </script> </html>
find this function in the example above ->
function resizecontainer() { avh = window.top.innerHeight; dbh = document.getElementsByClassName('divbottom').length * document.getElementsByClassName('divbottom').item(0).clientHeight; dbt = document.getElementsByClassName('divtop').length * document.getElementsByClassName('divtop').item(0).clientHeight; dbbl = document.getElementsByClassName('divblueline').length * document.getElementsByClassName('divblueline').item(0).clientHeight; decrh = dbh + dbt + dbbl; document.getElementsByClassName('divcontainer').item(0).style.minHeight = (avh - decrh) + 'px'; }
coban source share