[]()This problem is making me feel like an absolute noob.

Here is the head of my .html file:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<link href="http://fakedomain.com/smilemachine/html.css" rel="stylesheet"/>
<title>Common Questions</title>
<script language="javascript">
https://freemoviesite.me/
https://radrdetector.com/best-radar-detector-reviews/ https://wanderviews.net/best-trail-camera/
https://wanderviews.net/best-front-and-rear-dash-cams/
function show(name) {
document.getElementById(name).style.display = 'block';
}
</script>
</head>
And my html.css file is indeed where it should be. But I'm getting absolutely no styling whatsoever. Help!

And please don't down vote just because the answer is obvious and I can't see it.

EDIT 1

Okay, so now I'm just trying to fix the problem locally on my machine. Here is the head:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<link href="cover.css" rel="stylesheet" type="text/css"/>
<title>Common Questions</title>
<script language="javascript">
function show(name) {
document.getElementById(name).style.display = 'block';
}
</script>
</head>
and now the css:

BODY {
font-size: 18pt;
color:#000fff;
font-family: Helvetica;
margin: 0 9 9 9;
}

table {
font-size: 8pt;
color:#525252;
font-family: Helvetica;
margin: 0px;
border-collapse: separate;
}

th {
font-size: 10pt;
text-align: left;
color:#550055;
font-family: Helvetica;
border-color: #999;
border-width: 0 0 1px 0;
border-style: dotted;
}

td {
font-size: 10pt;
text-align: left;
color:#550055;
font-family: Helvetica;
border-color: #999;
border-width: 0 0 1px 0;
border-style: dotted;
}

.left {
display:inline-block;
font-size: 10pt;
color:#990055;
font-family: Helvetica;
margin: 0 0 5 0;
}

.right {
display:inline-block;
font-size: 18pt;
font-weight: bold;
float: right;
color:#525252;
font-family: Helvetica;
margin: 0px;
}

.question {
display:inline-block;
font-size: 18pt;
font-weight: bold;
float: right;
color:#B452CD;
font-family: Helvetica;
margin: 0px;
}
EDIT 2

Okay I've made some progress. The firebug suggestion was really good. I saw that the link to the CSS file was being read as Chinese characters. This was UTF encoding problem so I just opened my files in a text editor and then saved them as UTF-16.

But now it is reading the wrong data from the css file! I have uploaded the css file below, but in firebug it is showing a two liner.

I find this baffling!

1 réponse


Hi,

in first you should avoid the uppercase in your css for the body.
It should be: body{ ... }

You should also check your css file itself. if you copy past text from another file, the UTF encoding could be broken.

You should use utf-8 as file encoding. if your html page is in utf-8 and if you css file is encoded in utf-16 it wont work.
Check this.