爲什麼高度爲433px?我做這個頁面http://www.elektroninescigaretes.ym.lt/,當我檢測一個元素它顯示我div只有433px,我想在頁腳作出保留所有權利(三)的東西,所以我需要div的所有頁面的高度不僅上部。html div容器內部不受高度影響
//index file
<?php include ("template/header.php"); ?>
<div id = "home_content"></div>
<?php include ("template/footer.php"); ?>
//header file
<!DOCTYPE html>
<html>
<head>
<link rel = "stylesheet" href = "media/styles/style.css" media = "screen">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>el Cigarai</title>
</head>
<body class = "<?php
$remove = array(".php", "/");
$url = $_SERVER['SCRIPT_NAME'];
$current_file = str_replace($remove, "", $url);
$current_page = explode('_', $current_file);
echo $current_page[0];
?>">
<div id = "container">
//footer file
</div>
</body>
</html>
/style file
#container{
position: relative;
margin: 0 auto;
width: 960px;
height: 100%;
}
#home_content{
position: absolute;
top: 294px;
right: 60px;
width: 960px;
height: 750px;
background-image: url('../images/woman.jpg');
background-repeat: no-repeat;
overflow: hidden;
}
請:格式代碼,設置文本格式,並要求一個清晰的問題 –
'#home_content'是出了文檔流,因爲它具有屬性'位置:absolute'。如果刪除該屬性,則允許內容展開父容器。不幸的是,你將不得不改變網站的工作方式,但你也許可以設置一個固定的高度。 –