1

When I opened my webpage, the CSS was not working so I checked the console to see what was going on and it turns out it wasn't loading because my CSS was in Chinese, even though it is English in my Sublime Text program.

Here is the Chinese:

⨯䜠湥牥污䌠卓映牯攠敶祲瀠条⁥⼪਍汵渣癡笠਍瀉獯瑩潩㩮猠楴正㭹਍††楬瑳猭祴敬琭灹㩥渠 湯㭥਍††慭杲湩›㬰਍††慰摤湩㩧〠഻ †漠敶晲潬㩷栠摩敤㭮਍††慢正牧畯摮挭汯牯›㌣㑆㑄㬲਍†† 潢⵸桳摡睯›瀰⁸瀸⁸㘱硰〠硰爠执⡡ⰰⰰⰰ⸰⤲഻ऊൽഊ氊⹩慮⁶ൻ †映潬瑡›敬瑦഻ऊൽഊ氊⁩ⱡ愠瀮摡 笠਍††楤灳慬㩹椠汮湩ⵥ汢捯㭫਍††潣潬㩲⌠㉅㙅㍅഻ †琠硥⵴污杩㩮挠湥整㭲਍††慰摤湩㩧㈠瀰⁸ 㔲硰഻ †琠硥⵴敤潣慲楴湯›潮敮഻ऊ潦瑮猭穩㩥㈠瀰㭸਍昉湯⵴慦業祬›匧畯捲⁥慓獮倠潲Ⱗ猠湡⵳敳 楲㭦਍紉਍਍楬愠瀮摡笠਍瀉摡楤杮›〲硰㘠瀰㭸਍紉਍਍楬渮癡愠栺癯牥笠਍戉捡杫潲湵ⵤ潣潬㩲⌠䐸 㤹〹഻ऊൽഊ氊⁩⹡捡楴敶栺癯牥笠਍按汯牯›䔣䔲䔶㬳਍紉਍ഉ栊浴ⱬ戠摯⁹ൻ †洠牡楧㩮〠഻ †瀠摡 楤杮›㬰਍戉捡杫潲湵ⵤ潣潬㩲爠执㠨ⰹ㤠ⰸㄠ㘰㬩਍紉਍਍⹡捡楴敶笠਍戉捡杫潲湵ⵤ潣潬㩲⌠㉅㙅㍅ ※਍按汯牯›㌣㑆㑄㬲਍紉਍਍爣杩瑨慮⁶ൻऊ汦慯㩴爠杩瑨഻ऊൽഊ瀊笠਍洉牡楧⵮潢瑴浯›瀲㭸 ਍ൽഊ栊笱਍洉牡楧⵮潢瑴浯›瀳㭸਍

My CSS is supposed to load as:

ul#nav {
position: sticky;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #3F4D42;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

li.nav {
float: left;
}

li a, a.pad {
display: inline-block;
color: #E2E6E3;
text-align: center;
padding: 20px 25px;
text-decoration: none;
font-size: 20px;
font-family: 'Source Sans Pro', sans-serif;
}

li a.pad {
padding: 20px 60px;
}

li.nav a:hover {
background-color: #8D9990;
}

li a.active:hover {
color: #E2E6E3;
}

html, body {
margin: 0;
padding: 0;
background-color: rgb(89, 98, 106);
}

a.active {
background-color: #E2E6E3; 
color: #3F4D42;
}

#rightnav {
float: right;
}

p {
margin-bottom: 2px;
}

h1{
margin-bottom: 3px;
}
  • Sidenote, that's not all chinese. – vrugtehagel Nov 13 '18 at 17:07
  • There must be something else going on here... Need more details – GrumpyCrouton Nov 13 '18 at 17:07
  • 1
    Check your Sublime Text file encoding settings. – BoltClock Nov 13 '18 at 17:08
  • @vrugtehagel google translate said it was chinese – Tyler Larson Nov 13 '18 at 17:09
  • Try to copy your CSS code and paste it in a `.txt` file in regular notepad then change the extension to `.css` and upload to your site. – Mustafa Nov 13 '18 at 17:09
  • @BoltClock How do I check that? – Tyler Larson Nov 13 '18 at 17:10
  • @Tyler Larson: See if either https://stackoverflow.com/questions/16195871/how-do-i-see-the-current-encoding-of-a-file-in-sublime-text or https://stackoverflow.com/questions/21289157/set-encoding-of-file-to-utf8-with-bom-in-sublime-text-3 helps - to be fair I don't use Sublime Text myself so I'm not familiar with how it works. – BoltClock Nov 13 '18 at 17:12
  • Yes, I've seen these happen when the HTML file is encoded as UTF-16 and the CSS is not. Or vice versa. Load each into a text editor that can properly identify the encoding and save with the same encoding. – Mr Lister Nov 13 '18 at 19:44

0 Answers0