2010-05-31 63 views
0

我显示的div PHP页面代码意外的空间

<?php 
session_start(); 
require_once("classlib/mainspace.php"); 

if (isset($_SESSION['username'])==FALSE) { 
    header("location:login.php"); 
} 
$user = new User($_SESSION['username']); 
?><!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=utf-8" /> 
    <link rel="stylesheet" type="text/css" href="style/style.css" /> 
    <title>SimpleTask - Home</title> 
    </head> 
    <body> 
    <div id="main"> 
     <div id="menu"> 
     <div id="items"> 
      <ul> 
      <li><a href="home.php">home</a></li> 
      <li>&bull;</li> 
      <li><a href="projects.php">my projects</a></li> 
      <li>&bull;</li> 
      <li><a href="comments.php">my comments</a></li> 
      </ul> 
     </div> 
     <div id="user"> 
      <p>Welcome, <?php echo $user->GetRealName(); ?><br/><a href="editprofile.php">edit profile</a> &bull; <a href="logout.php">logout</a></p> 
     </div> 
     </div> 
     <div id="content"> 
     <h1>HOME</h1> 
     </div> 
     <div id="footer"> 
     <p>footer text goes here here here here</p> 
     </div> 
    </div> 
    </body> 
</html> 

,你可以找到我的CSS这里http://tasker.efficaxdevelopment.com/style/style.css

,并观看现场页转到这里http://tasker.efficaxdevelopment.com/login.php

用户名:admin 密码:密码

回答

4

地址:

h1,p { 
margin:0; 
} 

默认情况下,这些元素和一些其他元素具有边距和填充。

+0

不错,像一个魅力工作 – user48202 2010-05-31 03:55:12

+0

@jon我想你应该改变标题。 – alex 2010-05-31 04:15:58