0

Alright, here's my problem. I have 4 files. One is HTML, One is CSS, one is my own Javascript, and one is the latest jQuery. They go together to form a page. When I load the HTML file from a folder on my computer, everything works. I then uploaded it to a website: http://mtgchaos.site11.com/ and while the javascript works fine, the CSS doesn't seem to be in there at all. All of the files are still in the same directory. What am I doing wrong?

Here is my code.

<!DOCTYPE html>
<html>
<head>
    <link type="text/css" rel="stylesheet" href="chaos.css"/>
    <script type="text/javascript" src="jquery-1.10.0.min.js"></script>
    <script type="text/javascript" src="Chaos.js"></script>
    <title>MTG Chaos Roller</title>
</head>
<body>
<div class="button">
    <input type="submit" value="Roll Chaos">
    <input type="submit" value="Roll EnchantWorldLand">
    <input type="submit" value="Roll PersonaLand">
    <input type="submit" value="Roll WackyLand">
    <input type="submit" value="Roll DurgsLand">
    <input type="submit" value="Roll PunishmentLand">
</div>
<div class="texmex"></div>
</body>
</html>

CSS:

body {
    background-color: black;
}
.button {
    text-align: center;
}
p {
    color: white;
}
4

2 回答 2

1

您上传的文件大写 c

试试这个 http://mtgchaos.site11.com/Chaos.css 将代码更改为

<link type="text/css" rel="stylesheet" href="Chaos.css"/>

它会起作用

于 2013-05-25T21:16:26.733 回答
0

当您尝试直接访问 css 文件时,您的服务器会抛出 404。这通常意味着服务器上的 css 文件丢失。将文件重新上传到服务器之前所在的路径,然后再次查看该页面。

我冒昧地猜测这会解决您的问题。

于 2013-05-25T20:41:49.270 回答