2010-02-21 64 views
1

I have an index.html and global.css files. When I open these files at Coda, Textmate, etc. , everything looks fine. than I try in firefox, index.html loads css from right path, but it doesnt take effect. than I tried to see css code from firefox, and I see signs like;css renders with strange characters

ॵ氮扵汬整笮慤摩涌㨰‵灸‰′㕰硽畲⹢畲汥琠汩筬楳琭獴祬攺摩獣㭰慤摩涌㨲灸扎摲慷汩湥筢潲摥爭扯瑴潭㨱灸⁤慳橋搠⍣搗紣捯湴敮琠栱管潮琺㈲灸⁇敯牧楡

and css doesnt work. do you have any id ea about the problem?

I tried to create fresh new css, and write the code in, but same problem happens again.


index.html

<link rel="stylesheet" href="css/global.css" type="text/css" media="screen" /> 

appreciate!!! thanks a lot!

+0

Do you use some compression like *deflate* or *gzip*? – Gumbo 2010-02-21 17:17:47

回答

3

Can it be that your CSS fi le is UTF-16 encoded, while your HTML document is ISO-8859-1/UTF-8, or the other way around? This question has been around on SO several times, and this was always the answer.

Update : Here is one.

+0

my css starts as ul.bullet{padding:0 5px 0 25px} ul.bullet li{list-style:di.........bla bla... so how can I define any UTF? :/ – 2010-02-21 17:19:37

+1

@artmania In some IDEs, you can select the encoding in the save dialog . Make sure you check both the HTML file and CSS. – 2010-02-21 17:21:19

+0

I opened the css and Saved As UTF8 with textmate, but still same problem :/ – 2010-02-21 17:24:34

0

check the servers/css file encoding

+0

how can i do that? same problem at both localhost and server. – 2010-02-21 17:17:46