I was throwing up a placeholder splash-page for a website that has been dormant for a few years, but is finally under design. The page is simply one big graphic with a mailto link on it. I wanted to have a hover affect over the link, and wanted to use CSS to pull it off. No sweat, I thought, I've done this plenty of times before. So off I went to hash together the dozen or so lines of CSS needed.
I tested in Safari first: great; then IE 5.2 Mac: great; then Netscape 7.1 Mac: nothing. What? Netscape has always tracked pretty well with Safari (or vice versa), but suddenly Netscape was behaving as if there was no stylesheet at all. I tweaked, look for typos, and tweaked again. Then I tried a few very basic things (black background) and realized that Netscape was just plain ignoring my CSS. I spent over an hour trying to figure it out. Even IE 6 Win XP and IE 5.5 Win ME recognized it.
I gave up and went downstairs. Three hours later I decided to take a different tack. I ran the page, simple as it was, through the W3 xhtml validator: it validated. Huh? So I took a flyer and ran it through the W3 CSS validator: failed with an error "CSS can't be imported from an HTML file." Whoa, first clue: server related. The server I was running on is our oldest server, in use for several years and running an old version of WebSTAR. The site won't live there when it goes live, but no sense in moving a still dormant site to a new server.
A quick review of the mime types in the server admin program revealed no default type for .css files; they were going out as the default text/html. I added text/css for .css files and the page validated and Netscape work flawlessly.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.