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 Center the Wrapper

Michal Broniewicz
Michal Broniewicz
6,681 Points

Closing </div> outsite of </section> problem

Hello, I just cant find out why my workspace is showing up an error when im closing /div> after whole section and footer. As I see in the video its made like that. There is a part of code im using

<section> <div id="wrapper"> inside content

  </section>
  <footer>&copy; Michal Broniewicz <br>
  <a href="https://www.facebook.com/BronieV">
    <img src="img/facebook-wrap.png" alt="facebook"></a>
  <a href="https://www.facebook.com/BronieV">
    <img src="img/mail.png" alt="mail"></a>  
  </footer>
  </div>
Michal Broniewicz
Michal Broniewicz
6,681 Points

You mean section opening tag? Its there. Its working alright when i close div inside of the section. Problem appears when i close it after closing section part

2 Answers

Adam Duffield
Adam Duffield
30,494 Points

I mean this... you havn't closed the div thats currently in a section so you can either close it before the section closes or start the div after it closes.

  </section>

  <div id="wrapper">
  <footer>&copy; Michal Broniewicz <br>
  <a href="https://www.facebook.com/BronieV">
    <img src="img/facebook-wrap.png" alt="facebook"></a>
  <a href="https://www.facebook.com/BronieV">
    <img src="img/mail.png" alt="mail"></a>  
  </footer>
  </div>
Michal Broniewicz
Michal Broniewicz
6,681 Points

Alright I think that would solve my problem. As I rewatch the lesson I see that if I would put div before opening section everything would work fine. That makes sense to me right now. Thanks for your help

Adam Duffield
Adam Duffield
30,494 Points

Hey I'm pretty sure to fix this you could just stick the div with the id "wrapper" underneath the section part. Ideally in most cases your containers (divs and sections e.c.t) want to close before opening a new one. I'm not too sure about the video though. Hope this helps.

Michal Broniewicz
Michal Broniewicz
6,681 Points

But when Im trying to close it after closing section it does not affect the footer which should be included into action.