Chapter 8

  • Please log in to reply
1 reply to this topic

#1 william SMITH

william SMITH

    New Member

  • Members
  • Pip
  • 1 posts

Posted 14 April 2014 - 03:00 PM

I wonder if anyone can help. I'm on chapter eight and can not get the font face and colour changes to take in my css file. When I load the journal. html file I get the standard font and a completely orange background. My journal.css file is below and attached.

@font-face {

font-family: "Emblema One";

src: url (""http://wickedlysmart...e-Regular.woff"),
url ("");


h1 {
font-family: "Emblema One", sans-serif;
font-size: 220%;

h2 {
font-size: 130%;
font-weight: normal;

body {

background-color: rgb(80%, 40%, 0%);
font-family: Verdana, Geneva, Arial, sans-serif;
font-size: small;

h1, h2 {
color: #cc6600;
text-decoration: underline;
blockquote {
font-style: italic;

Attached Files

#2 Beth Robson

Beth Robson

    Veteran Member

  • O'Reilly Employee
  • PipPipPipPipPipPipPipPipPip
  • 377 posts
  • Gender:Female
  • Location:Seattle, WA
  • Interests:I am interested in computer science, the Web, social media and the internet, Mac development, and adult learning.

Posted 14 April 2014 - 04:29 PM

Hi William,
There are a couple of problems with this. The first, unfortunately, is a change in browsers that's happened since we wrote the book - and that is, that many browsers now do not allow you to load fonts from a domain different from where your files are being served. This is why the heading font it not working. To remedy this, download the fonts, and put them in your directory and use a relative url to the font in the src: url() property:


This should solve that issue.

For the background color issue: you are setting the background color of the body to orange in the line:

background-color: rgb(80%, 40%, 0%);

If you remove this line, the background goes back to white (the default color).

Hope this helps!!

Elisabeth Robson
Author: Head First JavaScript Programming, Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users