Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

help with css

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

https://drive.google.com/file/d/0B1Xtk0fDEK6uRXlXQnpWbEl0bHc/view?usp=sharing

body { background: green; }

wreath

{ 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,878 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.