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 Styling Web Pages and Navigation Style the Portfolio

i need help with this

please help me with this, i think it might be bugged. i am putting in the #gallery thing and everything but it is not seperating into 2 collums.

1 Answer

Thas Eagans
PLUS
Thas Eagans
Courses Plus Student 2,533 Points

You need to float both columns.

/* for example */
.column 1 {
  width: 45%;
  float: left;
}

.column 2 {
  width: 45%;
  float: right;
}

Something along those lines. I'm not sure what the code is, cause you didn't post any.

</TREagans>

Oziel Perez
Oziel Perez
61,321 Points

Yeah a rule of thumb for me is: if you have objects inside a div and one will float left, the other one should pretty much be floating right. It helps prevent some weird issues where the second object would fall outside its parent element. If more than 2 elements, all the left floating elements should clear left and right floating elements should clear right. It would sound similar to one of those old facebook timeline layouts.