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

Why does the last bar doe stn affect anything?

Hi,

Im having a problem to put a content in my div tag, its outerDiv , a tag where i put all the content and then i set it on margin 0 auto and width e.g. 70% so it in centre.

My problem here :

http://codepen.io/anon/pen/bNdroP

Is that the last, as you see , is not affected by the outerDiv tag, but when i put it above the last comments , its affected but then it messed everyhitng up.

Does anyone know , or expect a good reason for this?

1 Answer

I can see a few things in the code that really stand out. The first thing that stands out to me is that you call the normalize.css file after you call your style.css file. Doing this overrides your custom stylings due to the cascading nature of CSS.

Another thing that stands out to me is the large number of ids and classes used I recommend limiting their use as much as possible. You might also reconsider your naming conventions. Using class names such as "box" and "container" is very vague and can contribute to issues in your coding.

As an answer to the original question regarding why this particular div is not being style properly, It appears that you are missing a closing div tag after the "header-wrapper" closing div tag. There are also some spelling inconsistencies in your class names that should be corrected.

I knew I'm doing something wrong , i just didn't see it coming ; p

Well , thank you , ill re-do my work again since I'm practicing to write better and ordinated HTML but well, first time is not the last one time ill do it :)

This is actually a code from somebody else page, and I'm just a little modifying it . As to refer box , it meant to be like a box ( square e.g. 200px, 200px ) .

Thank you anyways for pointing it out , ill try and take care of it .

Have a nice night/day !