我是新手在php和html脚本,所以我想知道是否有人可以给我一个关于如何设置我的页面结构的建议。
我需要创建一个具有页眉和页脚的页面,左侧页面菜单和显示网站内容的主要部分。
我认为框架集是这样的:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//IT” “http://www.w3.org/TR/html4/frameset.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1?>
<title>Framesets</title>
</head>
<frameset rows=”20%,70%,10%”>
<frame src=header.php>
<frameset cols=”20%,80%”>
<frame src=menu.php>
<frame src=main.php>
</frameset>
<frame src=footer.php>
</frameset>
<noframes></noframes>
</html>当有人点击显示在menu.php部分的链接时,只会用不同的选项调用main.php部分(或者我可以调用不同的php页面,每个选项一个),但我不确定这是最好的解决方案,有人能给我一些建议吗?
(对不起,我的英语!)
发布于 2012-07-25 05:23:13
你真的不需要框架,也许可以尝试这样的页面布局:
HTML
<header>
<?php include('header.php') ?>
</header>
<div class="main">
<nav>
<?php include('menu.php') ?>
</nav>
<div class="content">
<?php include('main.php') ?>
</div>
</div>
<footer>
<?php include('footer.php') ?>
</footer>CSS
html, body{
height: 100%;
}
header{
height: 20%;
}
.main{
height: 70%;
}
footer{
height: 10%;
}
nav{
width: 20%;
height: 100%;
float: left;
}发布于 2012-07-25 05:12:51
不,不是很好。
HTML框架集已被弃用,在最新版本的HTML中不再有效。
如果你需要这种功能,你仍然可以使用<iframe>,但总的来说,你尝试做的是一种非常非常过时的网页编写方式。
https://stackoverflow.com/questions/11639353
复制相似问题