3

I just started creating a personal website for me, then I came across a problem. As soon as I include two stylesheets, the second stylesheet doesn't load (doesn't render). My first stylesheet that does load (does render) looks like this:

@font-face {
    font-family: 'archive';
    src: url('archive-webfont.eot');
    src: url('archive-webfont.eot?#iefix') format('embedded-opentype'),
         url('archive-webfont.woff2') format('woff2'),
         url('archive-webfont.woff') format('woff'),
         url('archive-webfont.ttf') format('truetype'),
         url('archive-webfont.svg#archive') format('svg');
    font-weight: normal;
    font-style: normal;
}

The second stylesheet that doesn't load (doesn't render) looks like this:

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    color: #FFFFFF;
    background: #333333;
}

h1 {
    margin: 0;
    font-family: archive;
}

My HTML looks like this:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>Jacques Marais</title>

        <link rel="stylesheet" href="fonts/archive.css" title="Archive Font CSS" />
        <link rel="stylesheet" href="css/master.css" title="Master CSS" />
    </head>
    <body>
        <h1><span class="first-character">J</span>acques Marais</h1>
    </body>
</html>

When I look at the Resources panel in the Developer Tools, it shows both stylesheets, but when I look at the Sources panel, it only shows that one loaded:

Sources

Sources Panel

Resources

Resources Panel

I tried all methods mentioned here and here.

Update

Here are the Network and Console panes.

enter image description here

enter image description here

Update 2

enter image description here

Update 3

enter image description here

Community
  • 1
  • 1
Jacques Marais
  • 2,666
  • 14
  • 33

2 Answers2

2

Try this:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>Jacques Marais</title>

        <link rel="stylesheet" href="fonts/archive.css" />
        <link rel="stylesheet" href="css/master.css" />
    </head>
    <body>
        <h1><span class="first-character">J</span>acques Marais</h1>
    </body>
</html>

I just deleted the title attribute inside your link tag and it works. (I've tested it on my webserver)

No title attribute inside <link> tag.

http://www.w3schools.com/tags/tag_link.asp

Ops, never mind, it supports global attribute (included title), anyway if you delete them the page works... I've noticed also it works if you leave title attributes but without spaces inside them. Try to change your titles and delete all the spaces.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Gianca
  • 481
  • 1
  • 3
  • 9
-1

I am not sure is it really work or not. I have faced this same problem and found solution. At the second stylesheet do like this -

h1 {
    margin: 0;
    font-family: 'archive'; /* add your font-family name inside '' */ 
}
Sajeeb Ahamed
  • 6,070
  • 2
  • 21
  • 30