3 replies [Last post]
abbottr
abbottr's picture
User offline. Last seen 2 years 33 weeks ago. Offline
newbie
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
abbottr's picture
User offline. Last seen 2 years 33 weeks ago. Offline
newbie
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
User offline. Last seen 2 days 2 hours ago. Offline
rank Guru
Guru
Timezone: GMT-7
Joined: 2005-12-14
Posts: 3544
Points: 643

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

High on a hill, in Wrangellia.

gary.turner
gary.turner's picture
User offline. Last seen 4 hours 31 min ago. Offline
rank Moderator
Moderator
Timezone: GMT-5
Joined: 2004-06-25
Posts: 7928
Points: 1767

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

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.