Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Treehouse Club: CSS My First Web Page Changing Your CSS

Stuck trying to change font size to 0.75. I cant get it right?

Cannot figure out why its not accepting this.

style.css
/***********************************************
Top bar color 65px color:4D7094
***********************************************/
html { border-top: 65px solid #4D7094; }
  border-top: 20px solid #8A85A5;
}

/***********************************************
Body styling 
***********************************************/
body  { ...
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 20px;
  font-size .75em;
  line-height: 1.6em;
  font-family: Helvetica Neue, Helvetica, Arial, serif;
  color: #066;
  font-weight: 300;
}

.centered {
  text-align: right;
}

/***********************************************
Image styling 
***********************************************/
img {
  border-radius: 100%;
  max-width: 340px;
}

/***********************************************
Headline styling 
***********************************************/
h1 {
  font-size: .75em;
  line-height: .5em;
  color: #564581;
}

h2 {
  font-size: .75em;
  line-height: 1em;
  font-style: oblique;
  color: #aaa;
}

h3 {
  font-size: .75em;
  line-height: 1em;
  font-weight: normal;
}

h4 {
  margin-top: 60px;
  font-weight: 500;
  color: #564581;
}
index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>All About Joy's Page</title>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel="stylesheet" type="text/css">
    <link href="style.css" rel="stylesheet">
  </head>   
  <body> 
    <img src="sam.jpg" alt="Sam">

    <h1>My Name</h1>

    <h2>My Profession</h2>

    <h3>Where I Live</h3>

    <h4>What I do:</h4>
       <p>I'm a teacher at Treehouse, but you should write in what you do here!</p>

    <h4>What I enjoy doing:</h4>  
      <p>When I'm not writing code, I like to surf and play music. Your turn, write in something that makes you happy, or things you like to do in your free time.</p>

  </body>
</html>

1 Answer

Steven Parker
Steven Parker
210,130 Points

I see four issues, I'll identify them with comments added to the code:

html { border-top: 65px solid #4D7094; }
  border-top: 20px solid #8A85A5; /* this is the original line, it should be removed */
}                                 /* this extra brace should be removed

/***********************************************
Body styling 
***********************************************/
body  { ...                       /* this ellipsis is not part of CSS syntax */
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 20px;
  font-size .75em;                /* the property and value should be separated by a colon */

Thank you!

Steven Parker
Steven Parker
210,130 Points

kilian garland — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!