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


help with css

i need some help my floating images arent touching on the top and bottom with 0 margin and padding.


body { background: green; }


{ float: left; width: 110px; height: 110px; }

right {float: right;

width: 110px; height: 110px; } header h1 { text-align: center; font-size: 3em; margin: 0; } header { margin: 0; background: red; width: 100%; padding: 0; border-bottom: 40px; border-bottom-color: green;


section img { height: 100%; width: 50%; float: left; }

3 Answers

Kelly von Borstel
Kelly von Borstel
28,880 Points

Are wreath and right class names? If so, they should have a dot in front of them. So the css selectors would be .wreath and .right instead of wreath and right.

Make sure you refer to the "markdown cheatsheet" while writing your question. Markdown turns periods into a header, so your code is unreadable.

you should be preceding your code with the backticks followed by the language youre using which in this case is CSS. then after youre done writing the code end it with three backticks``

Maksim Kazlouski
Maksim Kazlouski
8,986 Points

If they aren't touching top and bottom of viewport, than you have problem with some elements pushing it away from it. Try setting border, padding, margin of all elements to zero and then reset them one by one until you find your problem. If it's not touching top and bottom when all border, padding, margin of all elements are set to zero, than try commenting all elements and add them one by one to see on what element your problem appears.

If problem in floating images with different height checkout css "clear" property. 8:00 min http://teamtreehouse.com/library/how-to-make-a-website/responsive-web-design-and-testing/build-a-three-column-layout

Otherwise share code of your project. You can use http://jsfiddle.net to share you work.