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 Responsive Web Design and Testing Build a Three Column Layout

Konstantinos Isaias
Konstantinos Isaias
516 Points

I have a problem on my contact page. the "secondary" column on my responsive.css doesnt float at the top right corner!

I have a problem on my contact page. the "secondary" column on my responsive.css doesnt float at the top right corner! instead it goes under the other column all the time. what should i do?

Can you post your responsive.css file?

Konstantinos Isaias
Konstantinos Isaias
516 Points
@media screen and (min-width: 480px) {
  /************************************** 
TWO COLUMN LAYOUT
***************************************/
 #primary { 
    width: 50%
      float: left;
  }

 #secondary {
    width: 40%;
    float: right;
  }

/************************************** 
3   *   5  =  15
100% - 15% = 85%
85% / 3 = 28.33333333333333333333
***************************************/


/************************************** 
PAGE: PORTOFOLIO
***************************************/

  #gallery li {
    width: 28.3333%;
  }

  #gallery li:nth-child(4n) {
    clear: left;
  }

      }
@media screen and (min-width: 660px) {

}

2 Answers

Hi Konstantinos,

 #primary { 
    width: 50%
      float: left;
  }

You're missing a semicolon after 50% This means your primary column would remain full width and not floated, causing your secondary column to always be underneath it.

Hi Konstantinos,

Check the widths on the other columns to ensure they're correct for the parent wrapper.

One way to check would to use a developer toolbar in the browser. This is usually F12 or you can right click on the area in your browser and choose 'Inspect Element'.

Hope that helps.

-Rich