Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

Todd Gersh
Todd Gersh
582 Points

Can't link main.css to my html file.

I cant seem to link my main.css file to my html file. I've spent a ton of time trying to figure out what I could be doing wrong. I am not finding anything.

Can you look at my docs and see what I am doing wrong?

I've continued on with other lesson plans and kept writing the main.css file.

It would be nice to see what my css markup is doing.

Thanks

kirkbyo
kirkbyo
15,791 Points

We cannot access your docs. Could you post the code from your the head of your html file, to figure out the problem. :)

Todd Gersh
Todd Gersh
582 Points
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Todd Gersh | Master of the Universe</title>
    <link rel="stylesheet" href"css/normalize.css">
    <link rel="stylesheet" href"css/main.css">
   </head>
kirkbyo
kirkbyo
15,791 Points

Is that everything? There should be something in your "head"

<head></head>
Todd Gersh
Todd Gersh
582 Points

there is plenty in my head brackets when I copy and paste it all that shows up is the title. Is this normal?

Todd Gersh
Todd Gersh
582 Points

here are the two links that sit in the head that reference to main.css & normalize.css

link rel="stylesheet" href"css/normalize.css" link rel="stylesheet" href"css/main.css"

Thanks

Hi Todd,

I fixed your code for you.

The forums will strip out html if not posted properly.

See this thread: https://teamtreehouse.com/forum/posting-code-to-the-forum

It will show you the different ways you can post code in the forums.

Todd Gersh
Todd Gersh
582 Points

Thanks for the info Jason. I will take a look at the link you posted tonight and post my code properly.

2 Answers

Ana Gledovic
Ana Gledovic
7,465 Points
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">

You didn't put equal sign = between href and "css/normalize.css" and "css/main.css" as well.

Todd Gersh
Todd Gersh
582 Points

Here you go

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Todd Gersh | Master of the Universe</title>
    <link rel="stylesheet" href"css/normalize.css">
    <link rel="stylesheet" href"css/main.css">
   </head>
  <body>
Ana Gledovic
Ana Gledovic
7,465 Points

Todd, you should look at tips for asking questions, or read this How-to guide I would really like to help you, but without your code it is not possible.

Alexander Kapriniotis
Alexander Kapriniotis
25,897 Points

You forgot the equal sign at the href. I suggest you use an editor with auto completion until you get the hang out of syntax