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 How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

Bruce Staszak
PLUS
Bruce Staszak
Courses Plus Student 2,507 Points

Can't seem to get the main.css code to work, please help.

Here's my code

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bruce Staszak</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html"> <h1>Bruce Staszak</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html">Porfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation wiht color and texture.</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Experimentation wiht color and texture.</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Trying to create an 80's style of glows.</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Drips created using Photoshop.</p> </a> </li> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Creating shapes using repetition.</p> </a> </li> </ul> </section> <footer> <a href=" http://facebook.com/brucestaszak"><img src="img/facebook-wrap.png" alt="facebook logo"></a> <a href=" http://witter.com/brucestaszak"><img src="img/twitter-wrap.png" alt="twitter logo"></a> <p>© 2013 Bruce Staszak.</p> </footer> </body> </html>

2 Answers

Ash Scott
Ash Scott
435 Points

Hi Bruce Staszak,

Are you sure the CSS file is in the /css folder? If it is, check your CSS is correct. Can you create me a codepen with your HTML and CSS so I can see the issue?

Cheers, Ash

Christof Baumgartner
Christof Baumgartner
20,864 Points

If you use markdown, this helps other users to read your code. Also be sure that they are in the css-folder relative to this html-file. It could also help, if you post your folder-structure and your main.css-file

<!DOCTYPE html>
<html>
<head>
    <title>Bruce Staszak</title>
    <meta charset="utf-8">
    <link href="css/normalize.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
</head>
<body>
    <header>
        <a href="index.html">
        <h1>Bruce Staszak</h1>
        <h2>Designer</h2></a>
        <nav>
            <ul>
                <li>
                    <a href="index.html">Porfolio</a>
                </li>
                <li>
                    <a href="about.html">About</a>
                </li>
                <li>
                    <a href="contact.html">Contact</a>
                </li>
            </ul>
        </nav>
    </header>
    <section>
        <ul>
            <li>
                <a href="img/numbers-01.jpg"><img alt="" src=
                "img/numbers-01.jpg">
                <p>Experimentation wiht color and texture.</p></a>
            </li>
            <li>
                <a href="img/numbers-02.jpg"><img alt="" src=
                "img/numbers-02.jpg">
                <p>Experimentation wiht color and texture.</p></a>
            </li>
            <li>
                <a href="img/numbers-06.jpg"><img alt="" src=
                "img/numbers-06.jpg">
                <p>Playing with blending modes in Photoshop.</p></a>
            </li>
            <li>
                <a href="img/numbers-09.jpg"><img alt="" src=
                "img/numbers-09.jpg">
                <p>Trying to create an 80's style of glows.</p></a>
            </li>
            <li>
                <a href="img/numbers-12.jpg"><img alt="" src=
                "img/numbers-12.jpg">
                <p>Drips created using Photoshop.</p></a>
            </li>
            <li>
                <a href="img/numbers-01.jpg"><img alt="" src=
                "img/numbers-01.jpg">
                <p>Creating shapes using repetition.</p></a>
            </li>
        </ul>
    </section>
    <footer>
        <a href="%20http://facebook.com/brucestaszak"><img alt="facebook logo"
        src="img/facebook-wrap.png"></a> <a href=
        "%20http://witter.com/brucestaszak"><img alt="twitter logo" src=
        "img/twitter-wrap.png"></a>
        <p>© 2013 Bruce Staszak.</p>
    </footer>
</body>
</html>