HTML网页显示在我的IDE(括号)上,但不在我的服务器上

时间:2013-12-04 22:44:59

标签: html css adobe-brackets

我正在为朋友制作一个网站,所以我在Brackets上编程,这是一个用于更改而不是TextEdit的IDE。无论如何,一切都很棒,页面显示在Chrome上很棒(没有服务器或任何类型的本地主机)。现在,我把它放在服务器上,但网页没有出来,只是organe背景。没有样式页面,它显示很好(显然没有任何风格),但随着样式页面,它变得搞砸了。我做错了什么?

<!DOCTYPE html>
<html>
    <head>
        <title> Alumni Association | Home </title>
        <link rel="stylesheet" type="text/css" href="style.css">
        <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/images/favicon.ico" />
    </head>
    <body>
        <div id="navigation">
            <ul>
                <li><a href="index.html">Home</a></li>
                <li><a href="news.html">News</a></li>
                <li><a href="contact_us.html">Contact Us</a></li>
                <li><a href="about_us.html">About</a></li>
                <li><a href="history.html">History</a></li>
                <li><a href="events.html">Events</a></li>
                <li><a href="support.html">Support</a></li>
            </ul>
        </div>
        <div id="header">
            <h1>Alumni Association</h1>
        </div>
        <div id="body">
            <div class="heading">
                <h2>Home</h2>
            </div>
            <div id="imagebox">
                <image src="images/Logo.png" alt="TEXT"></image>
            </div>
            <div class="textbox">
                <p></p>
                <div class = "heading"> <p>TITLE</p></div>
                <p>
                    TEXT HERE 
                </p>
                <div id="imagebox">
                    <image src="images/20131204_074026_3_bestshot.jpg" height="300px" width="400px"></image>
                </div>
            </div>
        </div>
        <div id = "login">
            <div id="sidepane">
                <div class="heading" style="border-radius:10px">
                    <h3><b>Login</b></h3>
                </div>
                <div class="textbox">
                    <form>
                        Username: <input type="text" name="username"><br><br>
                        Password: <input type="password" name="pword">
                        <input type="submit" value="Login">
                    </form>
                </div>
            </div>
            <div id="sidepane" style>
                <div class="heading" style="border-radius:10px">
                    <h3><b>Register</b></h3>
                </div>
                <div class="textbox">
                    <form method="link" action="registration.html">
                        <input type="submit" value="Register Now!">
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>

我的样式表:

body{background-color:#CC7A29}
div#header{
    text-align:center;
    font-size:20pt;
    color:#FFFFFF;
    font-family:britannicbold;
    background-color:#003965;
    width:750px;    
    padding:5px;
    float:middle;
    margin-left: auto;
    margin-right:auto;
}
div#body{
    background-color:#3366CC;
    margin-top; 0px;
    margin-left: auto;
    margin-right: auto;
    width: 750px;
    padding:5px;
}
div.heading{
    text-align:center;
    font-family:trebuchetms;
    padding-left:2px;
    background-color:#CC6600;
    padding-top:3px;
    padding-bottom:3px;
    border-color:#000000;
    border-width:5px;
    border-style:solid;
}
div.textbox{
    font-family:calibri;
    font-size:16pt;
    margin:5px;
    padding:3px;
}
div#sidepane{
    font-family:calibri;
    padding:5px;
    margin:7px;
    margin-bottom:10px;
    width:350px;
    float:left;
    background-color:#888888;
}
div#login{
    width:750px;
    margin:auto;
}
div#imagebox{
    margin-left:auto;
    margin-right:auto;
    width: 375px;
}
h2{
    font-size:30pt;
}
h3{
    font-size:20pt;
}
div#navigation{
    margin-left:auto;
    margin-right:auto;
    width:750px;
    padding:5px;
    background-color:#003965;
    font-family:calibri;
}
ul
{
    list-style-type:none;
    margin-top:0;
    margin-bottom:0;
    margin-left:auto;
    margin-right:auto;
    padding:0;
    overflow:hidden;
}
li
{
    float:left;
}
a:link,a:visited
{
    display:block;
    width:120px;
    font-weight:bold;
    color:#FFFFFF;
    background-color:#003965;
    text-align:center;
    padding:4px;
    text-decoration:none;
    text-transform:uppercase;
}
a:hover,a:active
{
    background-color:#3366CC;
}
div#symbol{
    position:absolute;
    top:10px;
    left:900px;
}
input[type="text"],input[type="password"]
{
width:300px;
}
input[type="text"]#short
{
width:100px;
}
input[type=submit] {
    width: 200px;
    height: 200px;
    font-size: 18pt;
}

我真的很感激我能得到的任何帮助!

1 个答案:

答案 0 :(得分:0)

我测试了你的代码,看起来不错。我认为这与您的服务器设置有关。

这一行看起来可能有问题

<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/images/favicon.ico" />

您的服务器上是否启用了php?你的文件有php扩展吗?

我的想法是?>可能会结束您的链接标记并导致某种问题。

如果你有一个我可以看到它的网址,我可能会帮助你更多。

编辑:

您发送的网址执行我上面描述的内容。

<DOCTYPE html>
<html>
    <head>
        <title> YHS Alumni Association | Home </title>
        <link rel="stylesheet" type="text/css" href="style.css">
    <meta charset="utf-8"> 
        <link rel="shortcut icon" href="Fatal error: Call to undefined function get_stylesheet_directory_uri() in /home/u190182631/public_html/YMHS Alumni Association Website/home.html on line 7

删除行<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/images/favicon.ico" />,它应该有效。

您要调用的php函数不存在。

相关问题