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!
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

Justin Riley
3,175 Pointscant align my images using CSS basics clearing floats technique
hey guys, no matter which technique i use. even trying Guils i can not get the tree images in this div to line up horizontally. i can get the 1 and 3 inline but not the center to follow his friends thanks justin
<div class="row"> <div class="thumbs1"> <a href="#" target="_blank"><img src="#" alt="web-sites"></a> </div> <div class="thumbs2"> <a href="#" target="_blank"><img src="#" alt="java"></a> </div> <div class="thumbs3"> <a href="#" target="_blank"><img src="#" alt="coming-soon"></a> </div>
.thumbs1, .thumbs2 .thumbs3 { width: 33.3%; } .thumbs1 { float: left; } .thumbs2 {
} .thumb3 { float: right; }
.group:after { content: ""; display: table; clear: both; }
4 Answers

Steven Parker
225,712 PointsI see three issues:
- the first rule is missing a comma between the ".thumbs2" and ".thumbs3" selectors
- the rule for ".thumbs2" is missing a "
float: left;
" property - the rule for ".thumb3" is spelled incorrectly (should be ".thumbs3", with an "s")
Plus, I noticed two other things not directly related to the issue:
- the outer "row" div has no closing tag
- the "group" class isn't being used in the HTML

zhiheng lan
2,151 PointsYou missing ,
between .thumbs2 and .thumbs3. and I think your html code need to be formated.

Justin Riley
3,175 PointsAhh! I’m an idiot! Fresh eyes thank you I’ll follow up!

zhiheng lan
2,151 PointsYou are welcome.

Justin Riley
3,175 PointsYES! floating the #2 left doesn't make sense yet at my level to put it in the center but hell i will take it! i spent an hour last night trying to make it work.

Steven Parker
225,712 PointsYou can actually float all 3 left, they will line up in order. But without a float, a div will occupy an entire line.
zhiheng lan
2,151 Pointszhiheng lan
2,151 PointsCool, very clear.