Deanjoe Deanjoe - 3 months ago 22
CSS Question

Why Firefox won't start Css without errors message?

I write this sample code on notepad for an html site with css but this won't work on Mozilla(version49.0.etc) while it does on IE, Chrome and Opera. If i start it on FF, debugger says "CSS has no errors" but it only display html code.
Someone know how to fix it?

Here there are the codes(html and CSS) of my site on local path:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="it">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="iso-8859-1">


<style type="text/css">
<link href="C:/Users/Dean/Desktop/Site/File/file1.css" rel="stylesheet" media="all">


<body class="sub">
<div class="alt">

<h1>Text here</h1>


And here there is the CSS file properties:

background-size:100% 100%;


.alt {background-color:hotpink;

.set {font-size:12px;


I'm assuming it is because your stylesheet is linked via the non standard file protocol (href="C:/Users/Dean/Desktop/Site/File/file1.css"). From my experience, Firefox usually complies to standards more than other browsers.

I'm assuming this is why your example works in other browsers, but not in FF. Try serving your stylesheet using an HTTP server.