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

HTML

Shadrach Thomas
PLUS
Shadrach Thomas
Courses Plus Student 8,915 Points

Main.css

Please my main.css is not working please i want someone to check what's wrong with my code.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Shadrach | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html"> <h1>Shadrach Thomas</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <div id="Wrapper"> <section> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Playing with blending mode in photoshop.</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Trying to create an 80's style glows.</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Drips created Using photoshop brushes.</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Creating Shapes Using repitition.</p> </a> </li> </ul> </section> <footer> <a href="http://twitter.com/smackazi90"><img src="img/twitter-wrap.png" alt"twitter logo"></a> <a href="http://facebook.com/Smackazi"><img src="img/facebook-wrap.png" alt"facebook logo"></a> <p>Ā© 2017 Shadrach Thomas.</p> </footer> </div> </body> </html>

Marco Gonzalez
Marco Gonzalez
5,452 Points

did you check if your main.css is placed in the correct folder? because your code seems okay. if your main.css is in the same folder as the index.html, then it wont link correctly

Shadrach Thomas
Shadrach Thomas
Courses Plus Student 8,915 Points

the main.css is in the css folder, how i wish i can attach a picture of my workspace

Marco Gonzalez
Marco Gonzalez
5,452 Points
Create a code block when you need to show multiple lines of HTML, CSS, Ruby, Java or other code. To create a code block:

Hit return twice -- this creates a new line and adds a space between the code block and any text above it. (It's important to make sure you have an empty line above and below your code block, or else the code formatting doesn't always work.)

Type three back tick characters: ```

Hit return to create another new line and paste or type your HTML, CSS or other code.

Hit return and add three more back tick characters: ```

Hit return again to create an empty space below the code block.
cedricd
cedricd
5,914 Points

I tried your code with a main.css in the css folder. It works. I guess it's something with your css file or code. Maybe you forgot a semicolon or curly brackets?

1 Answer

i bet it's either because you didn't mention the type

<link rel="stylesheet" type="text/css" href="css/main.css">

or the path is wrong Shadrach Thomas