3 replies [Last post]
abbottr
Offline
newbie
Last seen: 13 years 4 days ago
Timezone: GMT-5
Joined: 2009-09-28
Posts: 2
Points: 2

I have a site that's fully coded and laid out with CSS, however Firefox isn't finding my stylesheet. Safari finds it just fine, not sure about IE - check it out:

http://bdp.uwstout.edu/index2.php

Here's my code for the head:

<!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>Blue Devil Productions</title>
<!-- BEGIN CSS STYLES ----->
<link rel="stylesheet" type="text/css" href="css/reset.css" /> 
<link rel="stylesheet" type="text/css" href="css/style.css" />

Any ideas? I tried playing with direct linking to the sheet, also taking out comments in the sheet, but nothing?

abbottr
Offline
newbie
Last seen: 13 years 4 days ago
Timezone: GMT-5
Joined: 2009-09-28
Posts: 2
Points: 2

woops...guess I can't post

woops...guess I can't post the html code, but its a pretty standard way of calling the sheet....

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 1 year 32 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

But you have the calls to

But you have the calls to stylesheets nested between invalid comment tags, so anything can happen. My version of FF seems to see them fine, but really, we have to have valid html or we have no reason to complain. Validate that html!

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 30 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

To expand

To expand on Ed's comment:

HTML comment delimiters are the double hyphens. Each pair toggles the comment on or off. You threw in an extra pair, which left comments on.

<!-- BEGIN CSS STYLES ----->
...
<!-- END CSS STYLES ----->
 
<!-- BEGIN CSS STYLES --   --     ->
  ^                   ^    ^      ^
  comment             off  on     single
  on                       again  hyphen
                                  ignored
 
<!-- END CSS STYLES --   --     ->
  ^                 ^    ^      ^
  comment           on   off    single
  off                    again  hyphen
                                ignored
Not all browsers handle comment delimiters correctly.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.