0

由于我搜索了一段时间的页面中的某些内容,该页面变得混乱,我只是找不到问题所在。

可能是 zoek.html 中的 div,但你们可以看看吗?

究竟发生了什么:当打开此菜单时,正常页面菜单浮动在中间,菜单转到左侧,内容菜单也转到左侧。

home_zoek.php *PHP:

<?php
include("config/instellingen.php");
ob_start();
session_start();
$loggedin = $_SESSION['loggedin']; 

if (empty($_SESSION['naam'])){
    die("Log eerst in voordat u deze pagina bezoekt.");
}
if (isset($_GET['logout'])){
    session_destroy();
    header("Refresh: 0; url=\"index.php\"");
}
date_default_timezone_set("Europe/Amsterdam");
$logdate = date('H:i:s');                
$logs = "INSERT INTO `logs` (`id` ,`naam` ,`text`,`datum`,`ip`)VALUES (NULL , '$_SESSION[naam]', 'Heeft pagina $_SERVER[PHP_SELF] bekeken', '$logdate','$_SERVER[REMOTE_ADDR]');";
$meldingen2 = mysqli_query($connect, $logs);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Heijmans | Planning</title>
    <link href='http://fonts.googleapis.com/css?family=Droid+Serif:400italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="css/_style_logged.css" />
    <link rel="stylesheet" type="text/css" href="css/_style_menu_left.css" />
    <link rel="stylesheet" type="text/css" href="../css/_style_menu_left.css" />
    <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet'>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="../js/script.js"></script>  
    <!--[if IE]>
        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<?php include("home_menu.php"); ?>
    <div id="header-with-tabs">
        <?php include("home_menu-3.php"); ?>
    </div> 

    <div id="content">
        <?php include("home_menu-2.php"); ?>
        <div class="page-full-width cf">
             <div class="side-content fr">
                  <div class="content-module">
                       <div class="content-module-heading cf">
                            <h3 class="fl">Hoofd pagina</h3>
                            <span class="fr expand-collapse-text">Klik om te verkleinen</span>
                            <span class="fr expand-collapse-text initial-expand">Klik om te vergroten</span>
                        </div>
                        <div class="content-module-main">
                            <thead>
                                <p>
                                    <font color="black">Zoek hier op postcode of klantvraagnummer de resultaten verschijnen automatisch en zijn altijd up to date</font>
                                </p>
                                <p>
                                    <font color="black">Minimum 3 letters, bijv. 1093 VD.</font>
                                </p>
                                <?php include("zoek.html"); ?><br />
                                <div id="show_results"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </thead>
        </ul>
    </table>
</div>
</div>
</div>  
<?php include("home_footer.php"); ?>
</body>
</html>

zoek.html *PHP:

<head>
    <script type="text/javascript" src="js/search.js"></script>
    <script src="js/pagination.js" type="text/javascript"></script>
    <script>
    htmlData('search.php', '');
    </script>
</head>
<body>
    <div id="form">
        <input type="text" id="terms" onkeyup="getScriptPage('show_results','terms','1')" onblur="if ( this.value == '' ) this.value = this.defaultValue" onfocus="if ( this.value == this.defaultValue ) this.value = ''"/>
    </div>
    </div>
</html>
4

1 回答 1

1

识别您的代码以查看您的 html 代码中是否有额外的标签或错放的标签非常重要。在这种情况下,你</thead>在你<div class="content-module-main">的地方是错误的。此外,您还有额外的 </div>标签。

这里的另一个问题是您的文件中有<head>,<body></html>标签zoek.html。由于代码直接插入到父文件中,因此这里不需要它们home_zoek.php

删除它们,清理您的代码,它应该按预期运行。

于 2013-07-05T08:55:02.237 回答