5 replies [Last post]
Franz XD
Franz XD's picture
Offline
newbie
Last seen: 11 years 1 week ago
Timezone: GMT-4
Joined: 2011-05-01
Posts: 6
Points: 8

This is the weirdest thing.

I've been using my CSS right in the head and it worked fine, but when I decided to save it as a separate file and added the link tag in the head
<link type="text/css" rel="stylesheet" href="mystyle.css">
the CSS no longer works.

The html and css files are in the same directory, and the css is W3C validated. I even tried running it through Apache, but that didn't make a difference. Some older files I had work fine, but this new one does not work at all. Is there any reason this is happening?

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

Have you rebooted three times?

LINK tag works fine for me.

Franz XD wrote:

... and the css is W3C validated. ...

... and the markup?

Franz XD
Franz XD's picture
Offline
newbie
Last seen: 11 years 1 week ago
Timezone: GMT-4
Joined: 2011-05-01
Posts: 6
Points: 8

Markup now validated. I

Markup now validated.

I checked my browser error console, and am getting "Selector syntax error for

body {background-color:#000000;}

The rest of the styles started working, and this is the only part that doesn't work. It makes no sense.

Franz XD
Franz XD's picture
Offline
newbie
Last seen: 11 years 1 week ago
Timezone: GMT-4
Joined: 2011-05-01
Posts: 6
Points: 8

I have it online now. You can

I have it online now. You can click the css link in the menu to see the code.
http://www.indyprohq.com/home.php

As you can tell the background color isn't working. I fixed it before by adding bgcolor="#000000" to all the body tags, but I'd really like to not have to do that.

Any ideas?

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

<style type="text/css"> and

<style type="text/css"> and </style> does not belong in a CSS file. Remove them and report back.

Franz XD
Franz XD's picture
Offline
newbie
Last seen: 11 years 1 week ago
Timezone: GMT-4
Joined: 2011-05-01
Posts: 6
Points: 8

Yeah, I discovered that and

Yeah, I discovered that and fixed it already.

Problem solved. I just had to refresh the css files in the browser cache. -_-;