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

Why is my css file not linking. Don’t understand what I’m missing.

<link rel= “stylesheet” type=“text/css” href=“style.css”>

CSS (folder) .DS_Store normalize.css style.css

2 Answers

If the style.css is in a folder called "CSS" you will need to write as this:

<link rel= “stylesheet” type=“text/css” href=“css/style.css”>

Sorry, still had no affect.

can you send me the code in github? or here

<!DOCTYPE html> <head> <link rel= "stylesheet" type="text/css" href="css/styles.css"> <link rel= "stylesheet" href="css/normalize.css"> <meta name=viewport content="width=device-width, initial-scale=1"> </head> <header class="main-header"> <div class='container clearfix'> <h1 class="name"><a href="#">Student Name<a/><h1> <ul class='main-nav'> <li class="home"><a href="#">HOME</a></li> <li class="portfolio"><a href="#">PORTFOLIO</a></li> <li class="contact"><a href="#">CONTACT</a></li> </ul> </div> </header> <html> <body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>

@media(min-width: 769px){

*{ font-size: 100em; } .main-header { position: fixed; background: white; width: 100%; top: 0; }

.main-nav { position: relative; margin-top: 100; font-size: em; }

.name{ position: relative; top: 0; left: 0; }

.home{ position: relative; top: 0; left: 0; }

.portfolio{ position: relative; top: 0; right: 0; }

.contact{ position: relative; top: 0; right: 0; }

body { padding-top: 68px; }