CSS problem

They have: 105 posts

Joined: Mar 2006

Hi,

I know IE does not format webpages correctly, but what about CSS? When I view my web pages in Firefox it doesn't seem to recognise any of the css, I tried the w3c validator and it said that you can't use the attribute 'type' to declare the following:

How are you supposed to declare that if you can't use type? Confused Confused

calculator's picture

They have: 40 posts

Joined: Nov 2007

Here is how I usually declare css:

<style type="text/css" media="screen">@import "/css/foraccountants.css";</style>'

I use the import command to avoid very old browser to download the stylesheet. I don't use the url way of importing it to bypass IE4.

url way:
<style type="text/css" media="screen">@import url(/css/foraccountants.css);</style>'

You can still use the link command if you really want to but I usually only 'link' print stylesheets.
<link rel="stylesheet" href="/css/forprint.css" type="text/css" media="print" />'

Now regarding you problem, could you paste the whole code here. From the doctype declaration to the tag.

He has: 629 posts

Joined: May 2007

It may also be a MIME type issue. Can you post a link, please, so that we don't have to guess?

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.