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 CSS Layout Basics CSS Layout Project Column Layout with Media Queries

jiwan gurung
jiwan gurung
4,248 Points

what do you need to do to make the column float left and right?

my columns are not floating side to side.whats the main code to float it side by side?

1 Answer

dragos busuioc
dragos busuioc
24,908 Points

first,the width of boths divs,together must be 100%.Because div is a block element,by default the width is 100%.So you have to change the width to,let's say 45% for both divs.So you have 90%.And remain 10% for margins. Then you have to float to left the first div. firstDiv { float-left; }