Search code examples
cssgoogle-chromefirefoxstylesheet

Firefox won't load CSS


Firefox won't load my CSS :/ This is how I included it:

<!DOCTYPE html>
<html>
<head>
<title>Title here ;)</title>
<link type="text/xss" rel="stylesheet" href="/css/main.css" />
<script type="text/javascript" src="js/jquery.js"></script>

My site has 2 CSS files, it loads the second one, but not the main.css... This is how the main.css looks like:

body
{
  background-color:#6F6B6B;
}

hr
{
  color:lime;
}

a
{
  text-decoration:none;
  color:#A3F0FF;
}

a:hover
{
  color:#2EADC5;
}

.content
{
  margin-left:auto;
  margin-right:auto;
  width:85%;
  color:#ccc;
}

.logo
{
  margin-left:25px;
}

.navi
{
  margin: auto auto;
  float:right;
  display:inline;
}

.slogan
{
  display:inline;
  margin-left:25px;
}

.error
{
  background: #FE9A2E;
  color: #FF0000;
  border-top: 2px solid #DF0101;
  border-bottom: 2px solid #DF0101;
  text-align: center;
  padding: 5px 20px;
  font-size: 13px;
  margin-bottom: 15px;
}

.success
{
  background: #A9F5A9;
  color: #01DF01;
  border-top: 2px solid #2EFE2E;
  border-bottom: 2px solid #2EFE2E;
  text-align: center;
  padding: 5px 20px;
  font-size: 13px;
  margin-bottom: 15px;
}

.ref
{
  width: 75%;
  margin: 0 auto;
}

It works perfectly in Chrome, but not in Firefox - can somebody please explain me why?

Note: It won't even load in Firefox. I can include the script in Firefox with Inspect Element, but that's not how it should work :/

The site is hosted on my PC at the moment, so I can't provide a link because it's only reachable thought 127.0.0.1

Edit: Ough.... sorry for this stupid question, I wrote "xss" instead of "css" :| Thanks to Pablo. :)


Solution

  • Here is the problem:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Title here ;)</title>
    <link type="text/xss" rel="stylesheet" href="/css/main.css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    

    it should be this:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Title here ;)</title>
    <link type="text/css" rel="stylesheet" href="/css/main.css" />
    <script type="text/javascript" src="js/jquery.js"></script>