CSS样式表不会链接

汤玛士

链接我的CSS样式表突然停止工作了吗?

CSS文件是一个文件夹。另外,我使用了IDE自动填充功能来填写href。

另外,这是Lynda.com的练习文件

<cfquery datasource="photogallerydb" name="qPhotographer">
  SELECT * FROM Photographer WHERE featured = 1
</cfquery>
<cfquery datasource="photogallerydb" name="qPhotos">
  SELECT * FROM Photo WHERE photographerid = #qPhotographer.photographerid#
</cfquery>

<!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" />
  <title>Our Photo Gallery</title>
  <link rel="stylesheet" type="text/css" href="../styles.css" media="all" />
</head>

<body>

  <div id="main">
    <div id="header">
    </div>
    <div id="navbar" align="center">
      <a href="../home">Home</a>
      <a href="../photographers">Photographers</a>
      <a href="../photos">Photos</a>
    </div>
    <br class="clearfloat" />
    <div id="content">
      <h1>Our Featured Photographer</h1>
      <cfoutput>
        <h2>#qPhotographer.Firstname# #qPhotographer.Lastname#</h2>
      </cfoutput>

      <cfdump var="#qPhotos#">

    </div>
    <div id="footer">
      Copyright &copy;2009 Our Photo Gallery
    </div>
  </div>

</body>

</html>

CSS:

body {
	background-color: #ABBAF1;
	margin:0px;
	padding:0px;
}
body, table {
	font-family:Arial, Helvetica, sans-serif; 
}
h1 {
	font-size:1.2em;
	font-weight:bold;
}
h2 {
	font-size:1.1em;
	font-weight:normal;
}
h3 {
	font-size:.9em;
	font-weight:normal;
}
img {
	border:0px;
}
div {
	margin:0px;
	padding:0px;
	font-size:16px;
}
.clearfloat {
	clear:both;
	height:0px;
}
a {
	color:#000000;
	text-decoration:underline;
}
a.hover {
	text-decoration:underline;
}
#main {
	background-image: url(images/background.jpg);
	width:760px;
	border: 0px;
	height: 1400px;
	margin-top: 20px;
	margin-right: auto;
	margin-bottom: 0px;
	margin-left: auto;

}
#header {
	background-image: url(images/banner.jpg);
	height: 100px;
	width:inherit;
}
#navbar {
	background-color: #434DD1;
	height:2em;
	width:inherit;
	color: #CCC;
	padding-top: 15px;
}
#navbar a {
	color: #FFF;
	font-size: 18px;
	font-weight:bold;
	text-decoration:none;
	margin-left:15px;
	margin-right:15px;
}
#navbar a.visited {
	color: #FFF;
}
#content {
	padding-left:20px;
	padding-right:40px;
	padding-bottom:20px;
	padding-top:10px;
	min-height:300px;
}
#footer {
	padding-left:20px;
	padding-right:20px;
	font-size:12px;
	font-style:italic;
}
.oddrow {
	background-color:#fff;
}
.evenrow {
	background-color:#00ffff;
}

Firefox调试器:

Status report</p><p><b>message</b> <u>/photogallery/styles.css</u>  </p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/8.0.27</h3></body></htm

文件位置:

网址:http:// localhost:8500 / photogallery / home / index.cfm

HTML:C:\ ColdFusion2016 \ cfusion \ wwwroot \ Photogallery \ home \ index.cfm

CSS:C:\ ColdFusion2016 \ cfusion \ wwwroot \ Photogallery \ styles.css

用户名

服务器发出的错误消息photogallery用小写字母p表示,但是路径Photogallery用大写字母表示P哪有 Windows在路径中区分大写和小写的方式和/或服务器如何处理它们的方式可能存在问题。我个人建议不要在Windows路径或空格中使用大写字母。当您指定主页的URL时,您使用的是小写还是大写版本?

有关此问题的更多信息,请参见此答案

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章