Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
с CSS<div id='main'></div>
#main {
height:100%;
}
emagi каза:Бордер на кое?
Пробвай това:
с CSS<div id='main'></div>
#main {
height:100%;
}
<div style="width: 692px; height: 100%; border-left: 1px solid #9cbb44; border-right: 1px solid #9cbb44; padding-left: 15px;"></div>
Не той е главен и в него има други дивове.emagi каза:Така, както не даваш почти никаква информация, няма как да ти помогнем.Този див вложен ли е в друг див, или не?
Foxy каза:Не той е главен и в него има други дивове.emagi каза:Така, както не даваш почти никаква информация, няма как да ти помогнем.Този див вложен ли е в друг див, или не?
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Untitled Document</title>
<style type="text/css">
body {
padding:0;
margin:0;
}
</style>
<script type="text/javascript">
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
document.getElementById('main').style.height = pageHeight+'px'; //задаване взетата височина на броузъра на див с id=main
}
</script>
</head>
<body onload="getPageSize();">
<div id='main' style="width:500px; border:solid 1px red;"></div>
</body>
</html>