15 replies [Last post]
chuy244
chuy244's picture
Offline
newbie
torreon, coahuila, mexico
Last seen: 14 years 39 weeks ago
torreon, coahuila, mexico
Timezone: GMT-5
Joined: 2007-06-30
Posts: 8
Points: 0

Hi! I'm relatively new to CSS I've been working on this site trying to use web standardas a CSS, but now i've encounter a problem... I've got this simple page whith the following code:

Test styles

hola

inside de external style sheet I've only got the following:

body
{
background-color:#FFFFFF;
color:#003366;
font-family:Verdana, Arial, "Times New Roman";
font-size:11px;
text-align:center;
}

when I see this page on IE everything is perfect, but when i see it on firefox the styles doesn't apply... i've noticed that if i change the path to my style sheet to a relative path it works fine on firefox, but I need it to be an absolute path as i need to launch the page from a program, i've search a lot already I and i just don't know what I'm doing wrong, the page validates, the css too... I'm getting desperated... Tongue.... please help!!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

What ever that server is you

What ever that server is you have linked to for the style sheet, it's not configured to serve .css files correctly have a look at what mime type - if any - is set for these file types.

IE is sniffing the file to determine what to do with it , which is why I think it looks as though it's working

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

jcaristy
Offline
newbie
Colombia
Last seen: 15 years 4 weeks ago
Colombia
Timezone: GMT-5
Joined: 2007-06-30
Posts: 3
Points: 0

Check the Mime types

After doing a validation in th3 w3c css validator I get the error "Unknown mime type".

Try to put

@charset "utf-8";

In the beggining of the css file.
This way firefox would know what kind of file is.

I hope this helps!

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 22 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

@jcaristy: You're confusing

@ jcaristy: You're confusing MIME type with character encoding.

@ chuy244: Not only does the server not deliver the proper text/css content type, it does not serve a response header at all. Further, any sane server configuration would cause an unknown type to be served as text/plain, a safe content type.

Please discuss this with your host's web server administrator.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

jcaristy
Offline
newbie
Colombia
Last seen: 15 years 4 weeks ago
Colombia
Timezone: GMT-5
Joined: 2007-06-30
Posts: 3
Points: 0

You're rigth. My mistake.

You're rigth.
My mistake.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 15 weeks 17 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

All fixed?

All fixed?

Verschwindende wrote:
  • CSS doesn't make pies

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 22 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

@ TPH: The server is still

@ TPH: The server is still misconfigured.

Quote:

C:\home>wget -S http://www.cimaco.com.mx/tienda/estilos/estilos_cimaco.css
--12:47:34-- http://www.cimaco.com.mx/tienda/estilos/estilos_cimaco.css
=> `estilos_cimaco.css'
Resolving www.cimaco.com.mx... 148.243.217.120
Connecting to www.cimaco.com.mx|148.243.217.120|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 Document follows
Server: IBM-HTTP-Server/1.0
Date: Sun, 01 Jul 2007 18:48:32 GMT
Connection: close
Accept-Ranges: bytes
Content-Type: www/unknown
Content-Length: 3634
Last-Modified: Sat, 30 Jun 2007 18:19:47 GMT
Length: 3,634 (3.5K) [www/unknown]

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

chuy244
chuy244's picture
Offline
newbie
torreon, coahuila, mexico
Last seen: 14 years 39 weeks ago
torreon, coahuila, mexico
Timezone: GMT-5
Joined: 2007-06-30
Posts: 8
Points: 0

may be, but I've still got a doubt

Thanks so much for the help so far, I'm going to investigate about that of the mime type and the server config, but now I tried this... I erased the doctype part from the file and then it worked ok on firefox and in IE (but of course it didn't validate and I know I'm suppose to declare a doctype), any clue why this?? (if I declare the doctype again, it stops working for Firefox again.... =( ... Tongue ) :shrug:

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 22 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

In spite of any oddities

In spite of any oddities that pop up, if you have something known to be wrong, and especially if that something bears on the problem, you need to fix it before trying anything else. Certainly, removing the DTD is not a Good Idea.

Y bienvenidos a los foros.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

chuy244
chuy244's picture
Offline
newbie
torreon, coahuila, mexico
Last seen: 14 years 39 weeks ago
torreon, coahuila, mexico
Timezone: GMT-5
Joined: 2007-06-30
Posts: 8
Points: 0

KK5st: you're right... I'll

KK5st: you're right... I'll try to figure out the thing about the mime types.... thanks

chuy244
chuy244's picture
Offline
newbie
torreon, coahuila, mexico
Last seen: 14 years 39 weeks ago
torreon, coahuila, mexico
Timezone: GMT-5
Joined: 2007-06-30
Posts: 8
Points: 0

CSS works on IE not on Firefox (Mime types solved)

I'm back... finally we'v been able to work out the thing about the mime types (at least the W3C validator doesn't throw the mime type error any more), but I still can't see the styles on Firefox, the pages work just fine with any browser but firefox.

link to page: http://www.cimaco.com/webdes/index.html
link to css: http://www.cimaco.com/webdes/estilos/estilos_cimaco.css
(there are more css files involved ofcourse).

Please somebody help!!! Tongue Just don't know what i'm doig wrong!!:shrug:

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 22 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

I get only 404 not found

I get only 404 not found errors for these links.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

chuy244
chuy244's picture
Offline
newbie
torreon, coahuila, mexico
Last seen: 14 years 39 weeks ago
torreon, coahuila, mexico
Timezone: GMT-5
Joined: 2007-06-30
Posts: 8
Points: 0

oops!! :P

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 22 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Shows up fine for me. Clear

Shows up fine for me. Clear your cache or reload using [ctl+shift+r].

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

chuy244
chuy244's picture
Offline
newbie
torreon, coahuila, mexico
Last seen: 14 years 39 weeks ago
torreon, coahuila, mexico
Timezone: GMT-5
Joined: 2007-06-30
Posts: 8
Points: 0

jejeje true... thanks a lot

jejeje... that's true.. i was loading from the cache... so it seams it's solved, it was the mime types lol... thanks a lot for the help... as I stated at the beginin of the thread I'm a newbie at CSS and web standards, but I'm really looking forward to learn more and I hope I can become a real contributor to the web design and development comunity... Smile

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 15 weeks 17 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

chuy244 wrote:as I stated at

chuy244 wrote:
as I stated at the beginin of the thread I'm a newbie at CSS and web standards, but I'm really looking forward to learn more and I hope I can become a real contributor to the web design and development comunity... Smile

Badly-configured servers aren't your fault at all, it's not something that people new to web development should come across - you got unlucky Wink

Verschwindende wrote:
  • CSS doesn't make pies