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

Steve Marteness
Steve Marteness
1,719 Points

I'm having an issue with the main.css file coding not showing the work when I refresh the web page.

index.html

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Steven Dibuono | Race Car Driver</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html"> <h1>Steven Dibuono</h1> <h2>Race Car Driver</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>Experimintation with color and texture.</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="Img/numbers-02.jpg" alt=""> <p>Playing with bending modes 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 of glow.</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="Img/numbers-09.img" 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 repetition.</p> </a> </li> </ul> </section> <footer> <a href="http://twitter.com/smarteness"><img src="img/twitter-wrap.png" alt="Twitter Logo"></a> <a href="http://facebook.com/stevemarteness"><img src="img/facebook-wrap.png" alt="Facebook Logo"></a> <p>Ā© 2015 Steven Dibuono.</p> </footer> </div>
</body> </html>

main.css

a{ text-decoration:none; }

4 Answers

What work are you referring to and have you saved both documents?

the links are retaining whatever style they had from a previous style declaration or the browser default.

try a:link { text-decoration: none; }

Steve Marteness
Steve Marteness
1,719 Points

thanks for the reply I tried the a:link { text-decoration: none;}

still getting the same result, doesn't remove the underline, tried on a Mac and Windows machine - same result ?????

The css file you created is called main.css and you did move it into the css folder right? I think main.css needs to be closed before you drag it into the css folder. And the file name will be case sensitive.

Your code should have been fine by the way. But I was taking a guess. Since I can't see your directory structure.

You could try. creating another css file with a new name and drag that into css folder then change your css link URL on the html file. Then add your css code to that file. Save both hamlet and the css file and refresh the browser.