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

Prakhar Patwa
Prakhar Patwa
11,260 Points

I have done this task in different way using float property

.primary { width:50%; float:left; margin-right:20px; }

.main-footer{
    clear:both;
}

Is this also okay?

5 Answers

I solved this challenge with use of float method too.I think it's better and produces less trouble.Just set the width to 46% and margins to 2% for both columns.

.primary-col, .secondary-col{ width:46%; margin: 2%; }

.primary-col{ float: left; } .secondary-col{ float:right; }

I also did the task in a different way and used the float property. I think you can do this exercise in multiply ways and get the same end result, the difference will be shorter css instead of a longer css uses.

.col {
    width:  50%;
    float:  left;
}

yes. I also did the challenge using floats. Guil wanted to teach us more about the display properties..

But yes the correct way of doing things is with floats.

Virochaan Ravi
Virochaan Ravi
6,940 Points

I think it is ok. I just turned I did this.

.container { display: flex; }

Kornel L
Kornel L
4,368 Points

I used float too.

.col { display: inline-block; width: 50%; float: left; padding: 0 25px;

}