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

HTML How to Make a Website Responsive Web Design and Testing Build a Three Column Layout

Tracey McEntyre
Tracey McEntyre
1,757 Points

three column layout

I'm not getting a third row when I maximize the screen. The images actually get smaller as the screen gets larger. Not sure where the problem lays. Here's my responsive.css:

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

/******************** TWO COLUMN LAYOUT ********************/

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

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

/******************** PAGE: PORTFOLIO ********************/

#gallery { width: 28.3333%; }

}

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

}

2 Answers

the code i use for three column layout is that i put .third class on my divs or on any element u r using. Here is the code:

.third {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    float: left;
    padding-right: 20px;
    width: 33.333%;
}

.third:last-of-type,.quarter:last-of-type {
    padding-right: 0;
}
Tracey McEntyre
Tracey McEntyre
1,757 Points

Thanks for your help. I actual sorted it out. I was missing ( li)