Here's a part of my .php file:
<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="IE=8" http-equiv="X-UA-Compatible">
<meta content="en-us" http-equiv="Content-Language">
<meta content="TEST" http-equiv="description">
<meta content="checkin, check-in, checkins, check-ins, checking-in, recommendations, popular, social, television, tv, show, shows, movie, movies, book, books, music, celebrity, game, games, video game, video games" http-equiv="keywords">
<title> Recommend Me: Find Me a Movie</title>
<link href="/css/reset.css" media="screen,projection" type="text/css" rel="stylesheet"/>
<link hr开发者_JS百科ef="/css/home.css" media="screen,projection" type="text/css" rel="stylesheet"/>
<link href="/css/dialog.css" media="screen,projection" type="text/css" rel="stylesheet"/>
<link href="/css/modals.css" media="screen,projection" type="text/css" rel="stylesheet"/>
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
</head>
<body>
The file structure is here:
Why can't I get the page formatted as the css? Removing those links to the css made no difference at all!
Try removing the leading slash. The leading slash indicates that the path starts at the website's root, which might not be the "Source Files" directory.
In other words, use css/reset.css
instead of /css/reset.css
.
You forgot to close your <meta>
tags (use <meta ... />
with the slash before the >
). So a browser is allowed to ignore anything after <meta content="IE=8" http-equiv="X-UA-Compatible">
as it does not belong inside <meta>
tag.
However, since browsers are usually able to understand crappy HTML, it might not be the cause of your problem. Are you sure the CSS stylesheets are loaded from the correct URL? Test if http://yourdomain/css/reset.css
actually exists. You might also simply want to remove the leading slash in the stylesheet URLs.
精彩评论