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

Wadzanai Mufunde
Wadzanai Mufunde
Courses Plus Student 9,174 Points

My columns won't work correctly.

I believe I've written the code correctly. Maybe I haven't. My output is wrong though. What I end up getting is everything on one column floated to the left, with a huge blank on columns 2 and 3. How do I fix this please?

@media (min-width: 769px) {

    .container {
        width: 90%;
        margin: 0 auto;

    .col {
        float: left;

    .secondary {
        width: 50%;

    .main-nav {
        float: right;

    .main-nav li {
        display: inline-block;
        margin-left: 15px;

    .tagline {
        font-size: 1.4em;

    /* ---- Float clearfix ---- */

    .clearfix::after {
        content: " ";
        display: table;
        clear: both;


@media (min-width: 1025px) {

    .container {
        width:  80%;
        max-width: 1150px;

    .primary {
        width: 40%;

    .tertiary {
        width: 30%;

1 Answer