Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

<link> element and CSS not working

0 views
Skip to first unread message

Wayne Essel

unread,
Feb 25, 2002, 9:08:15 PM2/25/02
to
I am having trouble running any stylesheet on my local web
server (localhost). Have Win2K Pro and IE 5.5. I have
reduced this to a single page with only an H3 tag within
the body. The page just ignores the stylesheet.

Here's the content of the stylesheet, test.css:
<STYLE>
.greenText
{
FONT-SIZE: 8pt;
FONT-FAMILY: Verdana;
COLOR: green;
}
</STYLE>

Here's the page:
<html>
<head>
<link rel="stylesheet" type="text/css" href="test.css">
</head>

<body class="greenText" >
<h3>this is a test</h3>
</body>
</html>

If I move the style element and contents from the
stylesheet to the head tag in the page, it works fine. If
the stylesheet is separate, the page ignores it.

Any ideas what is going on? Is there a setting on the web
server or in IE that needs to be set in order to use
stylesheets?

Any help would be appreciated.

Wayne

viza

unread,
Feb 26, 2002, 4:34:09 AM2/26/02
to
Thus quoth Wayne Essel:

> I am having trouble running any stylesheet on my local web
> server (localhost). Have Win2K Pro and IE 5.5. I have
> reduced this to a single page with only an H3 tag within
> the body. The page just ignores the stylesheet.
>
> Here's the content of the stylesheet, test.css:

> <STYLE>

You must not put that in your css file, it creates an invalid stylesheet.
Just start with the css.

> If I move the style element and contents from the
> stylesheet to the head tag in the page, it works fine. If
> the stylesheet is separate, the page ignores it.

That's because when it's inavlid it is required to ignore it.

Wayne Essel

unread,
Feb 26, 2002, 10:28:34 AM2/26/02
to
>-----Original Message-----
>> <STYLE>
>
>You must not put that in your css file, it creates an
invalid stylesheet.
>Just start with the css.

Thank you very much. The original stylesheet was given to
me to use and I never questioned the tags. So every pared
down version I used for testing had the tags in it. Took
them out and it now works fine. Wonder how come none of
my team mates who are already using the sheet noticed
this???

Wayne

0 new messages