对不起我问的是这些基本问题,但我在这个网站上教自己php页眉和页脚:http://www.creativemindspcs.org/index3.php。
我可以看到我的.php页眉和页脚以及导航的一部分,但为什么它们都不正确地左右对齐?这几乎就好像它们不会放在我的身体内容的代码中 - 它们看起来像是围绕着我的身体内容而不是内部。此外,我的导航并没有拿起我所有的CSS,只是其中的一部分。 http://www.creativemindspcs.org/index3.php。
索引页的代码:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Creative Minds International PCS</title>
<meta charset="utf-8">
<meta name="description" content="Your description">
<meta name="keywords" content="Your keywords">
<meta name="author" content="Your name">
<link rel="stylesheet" href="css/style.css">
<link href='http://fonts.googleapis.com/css?family=Vollkorn' rel='stylesheet' type='text/css'>
<script src="site/js/jquery-1.6.4.min.js"></script>
<script src="site/js/script.js"></script>
<script src="site/js/flashobject.js"></script>
<!--[if lt IE 7]>
<div class='aligncenter'><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg"border="0"></a></div>
<![endif]-->
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<link rel="stylesheet" href="css/ie.css">
<![endif]-->
<script type="text/javascript">
<!--
var image1=new Image()
image1.src="../slideshow3.jpg"
var image2=new Image()
image2.src="../slideshow2.jpg"
var image3=new Image()
image3.src="../slideshow4.jpg"
var image4=new Image()
image4.src="../slideshow1.jpg"
//-->
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28106351-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body id="page2">
<div class="main-bg">
<?php include('includes/header.php'); ?>
<?php include('includes/nav.php'); ?>
<div class="clear"></div>
</div>
<div class="flash">
<div id="head">
<div class="aligncenter"><img src="slideshow3.jpg" id="slide" alt="Creative Minds Slideshow" width="990" height="450"> <script>
<!--
//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slide.src=eval("image"+step+".src")
if (step<4)
step++
else
step=1
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",6000)
}
slideit()
//-->
</script>
</div></div>
</div>
</header>
<!--==============================content================================-->
<section id="content">
<div class="container_12">
<div class="wrapper">
<div class="grid_8" id="welcome" class="editable">
<article class="a4">
<h4>Welcome to Creative Minds</h4>
<div class="wrapper">
<figure class="img-indent"> </figure>
<p class="p2"> </p>
<p class="p2">
<strong>Creative Minds International Public Charter School is a new, tuition-free school for children in Washington, D.C.</strong> <br><Br>We are the only public school in the District of Columbia that offers the International Primary Curriculum, a highly engaging, diverse curriculum with project- and arts-based activities that foster creativity, self motivation, social and emotional development, and academic excellence. Our goal is to provide students with the foundational skills required for successful participation in a global society. <br><br>Our program’s unique combination of child-centered, international, and developmental approaches to education is based on extensive research into various aspects of schooling that have the greatest positive affects on academic achievement.
<br> <a href="programs.html">Read More</a><br><br>
</p>
</div>
</article>
<article class="a2">
<div class="wrapper">
<div class="grid_4 alpha">
<div class="box-1">
<h4><a href="careers.html" class="button2">Careers</a> <a href="requestmoreinfo.php" class="button2">Request More Info</a> <a href="apply.html" class="button2">Apply</a></h4>
</div>
<div class="grid_4 alpha">
<div class="box-2"> </div>
</div>
</div></div>
</article>
</div>
<div class="grid_4"><div class="grid_6" id="newsandevents" class="editable">
<h4 class="hp-2">News and Events</h4>
The Enrollment Lottery took place on Tuesday, April 17, 2012. Emails were sent to families of students who were selected through the lottery<br> on April 18, 2012. Enrollment packets were mailed to your address on April 20, 2012.<br><br>
If your child is on the waitlist, you will receive a postcard in the mail indicating his/her number on the waitlist. We will continue to move through our waitlists until October 2012 and contact you as spaces become available.<br><br>
FOR STUDENTS WHO WERE ADMITTED THROUGH THE LOTTERY, <strong>PLEASE REMEMBER MAY 14, 2012 IS THE DEADLINE</strong> FOR SUBMITTING YOUR CHILD’S ENROLLMENT PACKET TO ENABLE US TO RESERVE HIS/HER SPACE.
<br><br>
<img src="site/images/guitar2.jpg" align="left" alt="Guitar Logo">
</article>
</div>
</div>
</div>
</div></section>
</div>
<?php include('includes/footer.php'); ?>
<div id="dialog6" class="disable_masking"></div>
</body>
</html>
标题代码
<!--==============================header=================================-->
<div id="header">
<div class="inner">
<div class="meta-info">
<div class="extra-wrap">
<ul class="social-links">
<li><a href="index.html">English</a></li>
<li><a href="esp-index.html">Español</a></li>
<li><a href="contactus.html">Contact Us</a></li>
</ul>
<form id="main-search" action="search.php" >
<input type="text" name="search" style="background-color:#CCCCCC" >
<a class="search-submit" onClick="document.getElementById('main-search').submit()" ></a>
</form>
</div>
<br><br><br><a href="supportus.html" class="button3">Donate</a> <a href="apply.html" class="button4">Apply</a> </div>
<a class="logo" href="index.html"></a>
</div>
<div class="clear"></div>
</div>
导航代码:
<div id="nav-container">
<nav>
<ul class="sf-menu">
<li class="current"><a href="index.html">Home</a></li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="programs.html">Programs</a></li>
<li><a href="admissions.html">Admissions</a></li>
<li><a href="careers.html">Careers</a></li>
</ul>
</nav>
<div class="clear"></div>
</div>