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

Bart Mason
Bart Mason
1,166 Points

Not seeing changes with some of my css, specifically my "wrapper" code

a {
  text-decoration: none;
}
#wrapper {
  max-width: 940px;
  margin: 0 auto;
}
Bart Mason
Bart Mason
1,166 Points

I'll post my html as well. while the text-decoration worked appropriately, no margin changes were noticed with the #wrapper.

 <div id="wrapper">
      <section>
        <ul>
          <li>
            <a href="img/numbers-01.jpg">
              <img src="img/numbers-01.jpg" alt="">
              <p>Storefront or stormfront?</p>
            </a>
          </li>
          <li>
          <a href="img/numbers-02.jpg">
            <img src="img/numbers-02.jpg" alt="">
            <p>Using only high quality equipment like Kubota.</p>
          </a>
        </li>  
        <li>
          <a href="img/numbers-06.jpg">
            <img src="img/numbers-06.jpg" alt="">
            <p>Well equipped with quality Honda generators.</p>
          </a>
        </li>  
        <li>
          <a href="img/numbers-09.jpg">
            <img src="img/numbers-09.jpg" alt="">
            <p>We love Koala Bears.</p>
          </a>
        </li>    
        <li>
          <a href="img/numbers-12.jpg">
            <img src="img/numbers-12.jpg" alt="">
            <p>Come see us today at Southern Rentals and Sales.</p>
          </a>
        </li>     
      </ul>
    </section>
    <footer>
        <a href="http://twitter.com/bartmason72"><img src="img/twitter-wrap.png" alt="Twitter Logo"</a> 
        <a href="http://facebook.com/southernrentalsandsales/"><img src="img/facebook.png" alt="Facebook Logo"></a>
        <p>&copy; 2015 Bart Mason</p>
   </footer>
  </div>  
 </body>
</html>  
Bart Mason
Bart Mason
1,166 Points

also, I am very new to coding and deciphering the workings of anything digital. please let me know if my method of posting and questioning is clear and concise, and If I am using the correct terminology. thanks!

5 Answers

Try this - make sure to include a reference for your CSS file, as well as start the document with 'html', 'head', and 'body' tags.

<html>
 <head>
  <link rel="stylesheet" type="text/css" href="bart.css">
 </head>
 <body>
 <div id="wrapper">
      <section>
        <ul>
          <li>
            <a href="img/numbers-01.jpg">
              <img src="img/numbers-01.jpg" alt="">
              <p>Storefront or stormfront?</p>
            </a>
          </li>
          <li>
          <a href="img/numbers-02.jpg">
            <img src="img/numbers-02.jpg" alt="">
            <p>Using only high quality equipment like Kubota.</p>
          </a>
        </li>  
        <li>
          <a href="img/numbers-06.jpg">
            <img src="img/numbers-06.jpg" alt="">
            <p>Well equipped with quality Honda generators.</p>
          </a>
        </li>  
        <li>
          <a href="img/numbers-09.jpg">
            <img src="img/numbers-09.jpg" alt="">
            <p>We love Koala Bears.</p>
          </a>
        </li>    
        <li>
          <a href="img/numbers-12.jpg">
            <img src="img/numbers-12.jpg" alt="">
            <p>Come see us today at Southern Rentals and Sales.</p>
          </a>
        </li>     
      </ul>
    </section>
    <footer>
        <a href="http://twitter.com/bartmason72"><img src="img/twitter-wrap.png" alt="Twitter Logo"</a> 
        <a href="http://facebook.com/southernrentalsandsales/"><img src="img/facebook.png" alt="Facebook Logo"></a>
        <p>&copy; 2015 Bart Mason</p>
   </footer>
  </div>  
 </body>

Hi Brett-

You will need to give an element the ID of "wrapper", this will 'wrap' everything except the footer with the CSS code you included above.

<section id="wrapper"> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Storefront or stormfront?</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Using only high quality equipment like Kubota.</p> </a> </li>
<li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Well equipped with quality Honda generators.</p> </a> </li>
<li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>We love Koala Bears.</p> </a> </li>
<li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Come see us today at Southern Rentals and Sales.</p> </a> </li>
</ul> </section> <footer> <a href="http://twitter.com/bartmason72"><img src="img/twitter-wrap.png" alt="Twitter Logo"</a> <a href="http://facebook.com/southernrentalsandsales/"><img src="img/facebook.png" alt="Facebook Logo"></a> <p>Ā© 2015 Bart Mason</p> </footer>

Bart Mason
Bart Mason
1,166 Points

I didn't post my html correctly...please look at again.

Owa Aquino
Owa Aquino
19,277 Points

You need to include the wrapper id on your HTML tags.

Like this:

<body id="wrapper">

</body>```

...Bart - my apologies.

I meant for my response to include <section id="wrapper"> at the top of my code

Jordan Gauthier
Jordan Gauthier
5,552 Points

Your wrapper is using max-width, but if you want it to be 940px regardless of its content, then you could try min-width instead.

Check the body tag's css properties as well. Sometimes the css of the parent element can suppress css changes on the child.