为什么CSS文件没有从HTTP服务器集成到HTML中? [英] Why isn't CSS file being integrated in HTML from HTTP server?

查看:149
本文介绍了为什么CSS文件没有从HTTP服务器集成到HTML中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个用html文件响应的HTTP服务器,如图所示这里 [ ^ ]



我有一个附加的CSS文件给它一个很好的布局但我的服务器不发送CSS因为我不知道如何让它发送它。所有请求的内容类型都是text / html,但我对标题等一无所知。



如何让我的服务器发送像html这样的东西,图像和CSS一起在一个页面?



-Rixterz

Hi,

I have a HTTP server that responds with a html file, as seen here[^]

I do have an attached CSS file giving it a nice layout but my server doesn't send the CSS because I don't know how to make it send it. The content type for all requests is "text/html" but I don't know anything about headers etc.

How can I get my server to send things like html, images and css together in one page?

-Rixterz

推荐答案

这是显示在Firebug:

This is what shown on the Firebug:
<html>
<head>
<title>RIXTERZ-PC</title>
<link href="HomeStyle.css" type="text/css" rel="stylesheet">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Found</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Not Found</h2>
<hr><p>HTTP Error 404. The requested resource is not found.</p>
</BODY></HTML>
</link>
</head>
<body>
<div class="document">
<div class="title">
<div class="navigation_bar">
<ul class="navigation">
<a href="Home.html">
<a href="RemoteControl.html">
<a href="...">
<a href="...">
<li> Link 4 </li>
</a>
<a href="...">
<a href="...">
</ul>
</div>
<div class="the_rest">
</div>
</body>
</html>



似乎无法找到你的css文件。您是否将css文件和html文件放在Web服务器的同一文件夹中?


It seems that it could not find your css file. Did you place the css file and html file in the same folder in the web server?


这篇关于为什么CSS文件没有从HTTP服务器集成到HTML中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆